Part Number Hot Search : 
MAX8900B TRF20 3S211 BTB15B NX33SA KSJ1V211 70001 BTB15B
Product Description
Full Text Search
 

To Download TMP92C820FG Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  toshiba original cmos 16-bit microcontroller tlcs-900/h1 series TMP92C820FG semiconductor company
preface thank you very much for making us e of toshiba microcomputer lsis. before use this lsi, refer the section, ?points of note and restrictions?. especially, take care below cautions. ** caution ** how to release the halt mode usually, interrupts can release all halts status. however, the interrupts = (int0 to int3, intkey, intrtc, intalm0 to intalm4), which can release the halt mode may not be able to do so if they are input during t he period cpu is shifting to the halt mode (for about 3 clocks of f fph ) with idle1 or stop mode (idle2 is not applicable to this case). (in this case, an interrupt request is kept on hold internally.) if another interrupt is generated after it has shifted to halt mode completely, halt status can be released without difficultly. the priority of this interrupt is compare with that of the interrupt kept on hold internally, and the interrupt with higher priority is handled first fo llowed by the other interrupt.
tmp92c820 2007-02-16 92c820-1 cmos 32-bit microcontrollers TMP92C820FG/jtmp92c820 1. outline and device characteristics tmp92c820 is high-speed advanced 32-bit micro controller developed for controlling equipment which processes mass data. tmp92c820 is a microcontroller which has a high -performance cpu (900/h1 cpu) and various built-in i/os. TMP92C820FG is housed in a 144-pin flat package. jtmp92c820 is a 144-pad chip product. device characteristics are as follows: (1) cpu: 32-bit cpu (900/h1 cpu) ? compatible with tlcs-900, 900/l, 900/l1, 900/h?s instruction code ? 16 mbytes of linear address space ? general-purpose register and register banks ? micro dma: 8 channels (250 ns/4 bytes at f sys = 20 mhz, best case) (2) minimum instruction execution time: 50 ns (at sys = 20 mhz) restrictions on product use 070208ebp ? the information contained herein is subject to change without notice. 021023_d ? toshiba is continually working to improve the quality and reliability of its products. nevertheless, semiconductor devices in general can malfunction or fail due to their i nherent electrical sensitivity and vulnerability to physical stress. it is the responsibility of t he buyer, when utilizing toshiba products, to comply with the standards of safety in making a safe design for the entire system, and to avoid situations in which a malfun ction or failure of such toshiba products could cause loss of human life, bodily injury or damage to property. in developing your designs, please ensure that toshiba products are used within s pecified operating ranges as set forth in the most recent toshiba products specific ations. also, please keep in mind the precautions and conditions set forth in the ?handling guide for semiconduct or devices,? or ?toshiba semiconductor reliability handbook? etc. 021023_a ? the toshiba products listed in this document are intend ed for usage in general electr onics applications (computer, personal equipment, office equipment, measuring equipmen t, industrial robotics, domesti c appliances, etc.). these toshiba products are neither intended nor warranted for us age in equipment that requ ires extraordinarily high quality and/or reliability or a malfunction or failure of which may cause loss of human life or bodily injury (?unintended usage?). unintended usage include atomic ener gy control instruments, airplane or spaceship instruments, transportation instrument s, traffic signal instruments, com bustion control instruments, medical instruments, all types of safety devic es, etc. unintended usage of toshiba pr oducts listed in this document shall be made at the customer?s own risk. 021023_b ? the products described in this document shall not be used or embedded to any downstream products of which manufacture, use and/or sale are prohibited under any applicable laws and regulations. 060106_q ? the information contained herein is presented only as a gu ide for the applications of our products. no responsibility is assumed by toshiba for any infringements of patents or ot her rights of the third parties which may result from its use. no license is granted by implicat ion or otherwise under any patents or other rights of toshiba or the third parties. 021023_c ? the products described in this document are subject to foreign exchange and foreign trade control laws. 060925_e ? for a discussion of how the reliability of microcontrollers can be predicted, please refer to section 1.3 of the chapter entitled quality and reliability assurance/handling precautions. 030619_s
tmp92c820 2007-02-16 92c820-2 (3) internal memory ? internal ram: 8 kbytes (can use for code section) ? internal rom: none (4) external memory expansion ? expandable up to 136 mbytes (shared with program/data area) ? can simultaneously support 8-/16-/32-bit width external data bus .... dynamic data bus sizing ? separate bus system (5) memory controller ? chip select outputs: 4 channels (6) 8-bit timers: 4 channels (7) 16-bit timer/event counter: 1 channel (8) general-purpose serial interface: 3 channels ? uart/synchronous mode ? irda (9) serial bus interface: 1 channel ? i 2 c bus mode ? clock synchronous select mode (10) lcd controller ? shift register/built-in ram lcd driver ? supported 16, 8 and 4 gray-levels and black and white ? hardware blinking cursor (11) sdram controller ? supported 16-m, 64-m and 128-mbit sdram with 16-/32-bit data bus (12) timer for real-time clock (rtc) ? based on tc8521a ? separate the power supply (13) key-on wakeup (interrupt key input) (14) 10-bit ad converter: 5 channels (15) watchdog timer (16) melody/alarm generator ? melody: output of clock 4 to 5461 hz ? alarm: output of the 8 kinds of alarm pattern ? output of the 5 kinds of interval interrupt (17) mmu ? expandable up to 136 mbytes (4 local areas/8 bank methods) (18) interrupts: 45 interrupts ? 9 cpu interrupts: software interrupt instruction and illegal instruction ? 31 internal interrupts: seven selectable priority levels ? 5 external interrupts: seven selectable priority levels (4-edge selectable)
tmp92c820 2007-02-16 92c820-3 (19) input/output ports: 83 pins (except data bus (16bit), address bus (24bit) and rd pin) (20) standby function ? three halt modes: idle2 (programmable), idle1, stop (21) triple-clock controller ? clock gear function: select a high-frequency clock fc to fc/16 ? rtc (fs = 32.768 khz) (22) operating voltage ? dvcc = 3.0 to 3.6 v ? rtcvcc = 2.0 to 3.6 v (23) package ? 144-pin qfp (p-lqfp144-1616-0.40c) ? chip form supply also available. for de tails, contact your local toshiba sales representative
tmp92c820 2007-02-16 92c820-4 figure 1.1 tmp92c820 block diagram ix iy iz sp l h e d c b a w xsp xiz xi y xix xhl xde xbc xwa 900/h1 cpu f sr 32 bits pc 8-kbyte ram serial i/o sio0 (txd0) pf0 (rxd0) pf1 (sclk0/ cts0 ) pf2 (txd1) pf3 (rxd1) pf4 (sclk1/ cts1 ) pf5 ( cs2g /txd2) p95 ( csexa rxd2) p96 (sck) p90 (so/sda) p91 (si/scl) p92 serial i/o sio1 dvss [4] dvcc [3] x1 x2 xt1 xt2 h-osc mode controller port 0 10-bit 5-channel ad converter pg0 to pg4 (an0 to an4) ( adtrg ) pg3 avcc avss vrefh vrefl port 9 ( cs2e ) p93 ( cs2f ) p94 8-bit timer (timer 1) 8-bit timer (timer 2) (ta0in) pc0 8-bit timer (timer 3) 16-bit timer (ta3out/int2) pc5 (tb0out0/int3) pc6 (ta1out/int1) pc1 serial bus i/f sbi0 interrupt controller d0 to d7 p10 to p17 (d8 to d15) p20 to p27 (d16 to d23) p30 to p37 (d24 to d31) p40 to p47 (a0 to a7) p50 to p57 (a8 to a15) p60 to p67 (a16 to a23) p70 ( rd ) p71 ( wrll ) p72 ( wrlu ) p73 ( wrul ) p74 ( wruu ) p75 (r/ w ) p76 ( wait ) p80 ( cs0 / sdcsh ) p81 ( cs1 / sdcsl ) p82 ( cs2 / cs2a ) p83 ( cs3 ) p84 ( cs2b /ea24) p85 ( cs2c /ea25) p86 ( cs2d ) watchdog timer (d1bscp) pk0 (d2blp) pk1 (d3bfr) pk2 (dlebcd) pk3 (doffb) pk4 pl0 to pl7 (ld0 to ld7) ( sdras ) pj0 ( sdcas ) pj1 ( srwr / sdwe ) pj2 ( srllb /sdlldom) pj3 ( srlub /sdludom) pj4 ( srulb /sduldom) pj5 ( sruub /sduudom) pj6 (sdcke) pj7 (sdclk) p87 keyboard i/f pa0 to pa7 (ki0 to ki7) rtcvcc xt1/xt2/ be ( alarm / mldalm /pk6) rtc port 8 reset a m0 a m1 pc3 (int0) serial i/o sio2 sdram controller lcd controller 8-bit timer (timer 0) mmu clock gear l-osc port 1 port 2 port 3 port 4 port 5 port 6 port 7 melody/ alarm out
tmp92c820 2007-02-16 92c820-5 2. pin assignment and functions the assignment of input/output pins for the tmp92c820, their names and functions are as follows: 2.1 pin assignment 0h figure 2.1.1 shows the pin assignment of the TMP92C820FG. figure 2.1.1 pin assignment diagram (144-pin qfp) TMP92C820FG qfp144 top view p67/a23 p66/a22 p65/a21 p64/a20 dvcc3 p63/a19 p62/a18 p61/a17 p60/a16 p57/a15 p56/a14 p55/a13 a 54/a12 p53/a11 p52/a10 p51/a9 p50/a8 p47/a7 p46/a6 p45/a5 p44/a4 p43/a3 p42/a2 p41/a1 p40/a0 p37/d31 p36/d30 dvss3 p35/d29 p34/d28 p33/d27 p32/d26 p31/d25 p30/d24 p27/d23 p26/d22 vrefl vrefh pg0/an0 pg1/an1 pg2/an2 pg3/an3/ adtrg pg4/an4 pa3/ki3 pa4/ki4 pa5/ki5 pa6/ki6 pa7/ai7 pc0/ta0in pc1/ta1out/int1 pc5/ta3out/int2 pc6/tb0out0/int3 pf0/txd0 pf1/rxd0 pf2/sclk0/ cts0 pf3/txd1 pf4/rxd1 pf5/sclk1/ cts1 pl0/ld0 pl1/ld1 pl2/ld2 pl3/ld3 pl4/ld4 pl5/ld5 pl6/ld6 pl7/ld7 pk0/d1bscp pk1/d2blp pk2/d3bfr pk3/dlebcd pk4/doffb pk6/ alarm / mldalm rtcvcc xt1 xt2 be dvcc1 x1 dvss1 x2 am0 am1 reset pc3/int0 dvss2 dvcc2 p00/d0 p01/d1 p02/d2 p03/d3 p04/d4 p05/d5 p06/d6 p07/d7 p10/d8 p11/d9 p12/d10 p13/d11 p14/d12 p15/d13 p16/d14 p17/d15 p20/d16 p21/d17 p22/d18 p23/d19 p24/d20 p2 5/ d21 a vcc a vss pa2/ki2 pa1/ki1 pa0/ki0 pj7/sdcke pj6/sduudqm/ sruub pj5/sduldqm/ srulb pj4/sdludqm/ srlub pj3/sdlldqm/ srllb pj2/ sdwe / srwr pj1/ sdcas pj0/ sdras p96/ csexa /rxd2 p95/ cs2g /txd2 p94/ cs2f p93/ cs2e p92/si/scl p91/so/sd a p90/sck p87/sdclk p86/ cs2d p85/ea25/ cs2c p84/ea24/ cs2b p83/ cs3 p82/ cs2 / cs2a p81/ cs1 / sdcsl dvss4 p80/ cs0 / sdcsh p76/ wait p75/rw p74/ wruu p73/ wrul p72/ wrlu p71/ wrll p7 0/ rd 1 5 10 15 20 25 30 35 105 100 95 90 85 80 75 140 135 130 125 120 115 110 40 45 50 55 60 65 70
tmp92c820 2007-02-16 92c820-6 2.2 pad layout table 2.2.1 pad layout (144-pin chip) (chip size 4.68 mm 4.68 mm) unit: m pin no. name x point y point pin no. name x point y point pin no. name x point y point 1 vrefl ? 2213 1945 49 dvss2 ? 440 ? 2213 97 p55 2211 685 2 vrefh ? 2213 1820 50 dvcc2 ? 340 ? 2213 98 p56 2211 789 3 pg0 ? 2213 1694 51 p00 ? 240 ? 2213 99 p57 2211 894 4 pg1 ? 2213 1568 52 p01 ? 140 ? 2213 100 p60 2211 1000 5 pg2 ? 2213 1460 53 p02 ? 40 ? 2213 101 p61 2211 1107 6 pg3 ? 2213 1353 54 p03 59 ? 2213 102 p62 2211 1213 7 pg4 ? 2213 1249 55 p04 160 ? 2213 103 p63 2211 1321 8 pa3 ? 2213 1050 56 p05 260 ? 2213 104 dvcc3 2211 1430 9 pa4 ? 2213 946 57 p06 360 ? 2213 105 p64 2211 1546 10 pa5 ? 2213 842 58 p07 460 ? 2213 106 p65 2211 1672 11 pa6 ? 2213 739 59 p10 561 ? 2213 107 p66 2211 1798 12 pa7 ? 2213 635 60 p11 661 ? 2213 108 p67 2211 1924 13 pc0 ? 2213 531 61 p12 761 ? 2213 109 p70 1925 2211 14 pc1 ? 2213 427 62 p13 861 ? 2213 110 p71 1800 2211 15 pc5 ? 2213 326 63 p14 961 ? 2213 111 p72 1675 2211 16 pc6 ? 2213 224 64 p15 1062 ? 2213 112 p73 1558 2211 17 pf0 ? 2213 123 65 p16 1162 ? 2213 113 p74 1448 2211 18 pf1 ? 2213 23 66 p17 1263 ? 2213 114 p75 1346 2211 19 pf2 ? 2213 ? 77 67 p20 1363 ? 2213 115 p76 1243 2211 20 pf3 ? 2213 ? 179 68 p21 1474 ? 2213 116 p80 1141 2211 21 pf4 ? 2213 ? 284 69 p22 1589 ? 2213 117 dvss4 1038 2211 22 pf5 ? 2213 ? 388 70 p23 1702 ? 2213 118 p81 937 2211 23 pl0 ? 2213 ? 493 71 p24 1814 ? 2213 119 p82 835 2211 24 pl1 ? 2213 ? 598 72 p25 1926 ? 2213 120 p83 734 2211 25 pl2 ? 2213 ? 704 73 p26 2211 ? 1924 121 p84 633 2211 26 pl3 ? 2213 ? 809 74 p27 2211 ? 1799 122 p85 532 2211 27 pl4 ? 2213 ? 914 75 p30 2211 ? 1674 123 p86 431 2211 28 pl5 ? 2213 ? 1024 76 p31 2211 ? 1548 124 p87 330 2211 29 pl6 ? 2213 ? 1132 77 p32 2211 ? 1426 125 p90 229 2211 30 pl7 ? 2213 ? 1243 78 p33 2211 ? 1311 126 p91 128 2211 31 pk0 ? 2213 ? 1354 79 p34 2211 ? 1199 127 p92 28 2211 32 pk1 ? 2213 ? 1464 80 p35 2211 ? 1087 128 p93 ? 72 2211 33 pk2 ? 2213 ? 1576 81 dvss3 2211 ? 975 129 p94 ? 173 2211 34 pk3 ? 2213 ? 1701 82 p36 2211 ? 864 130 p95 ? 274 2211 35 pk4 ? 2213 ? 1826 83 p37 2211 ? 757 131 p96 ? 375 2211 36 pk6 ? 2213 ? 1953 84 p40 2211 ? 648 132 pj0 ? 477 2211 37 rtcvcc ? 1962 ? 2213 85 p41 2211 ? 541 133 pj1 ? 580 2211 38 xt1 ? 1851 ? 2213 86 p42 2211 ? 435 134 pj2 ? 684 2211 39 xt2 ? 1574 ? 2213 87 p43 2211 ? 332 135 pj3 ? 788 2211 40 be ? 1466 ? 2213 88 p44 2211 ? 228 136 pj4 ? 892 2211 41 dvcc1 ? 1360 ? 2213 89 p45 2211 ? 128 137 pj5 ? 996 2211 42 x1 ? 1257 ? 2213 90 p46 2211 ? 28 138 pj6 ? 1101 2211 43 dvss1 ? 1057 ? 2213 91 p47 2211 71 139 pj7 ? 1208 2211 44 x2 ? 957 ? 2213 92 p50 2211 171 140 pa0 ? 1319 2211 45 am0 ? 840 ? 2213 93 p51 2211 272 141 pa1 ? 1430 2211 46 am1 ? 740 ? 2213 94 p52 2211 374 142 pa2 ? 1555 2211 47 reset ? 640 ? 2213 95 p53 2211 477 143 avss ? 1828 2211 48 pc3 ? 540 ? 2213 96 p54 2211 581 144 avcc ? 1955 2211
tmp92c820 2007-02-16 92c820-7 2.3 pin names and functions the following table shows the names and functions of the input/output pins. table 2.3.1 pin names and functions (1/3) pin names number of pins i/o functions d0 to d7 8 i/o data: data bus 0 to 7. p10 to p17 d8 to d15 8 i/o i/o port 1: i/o port. input or output specifiable in units of bits. data: data bus 8 to 15. p20 to p27 d16 to d23 8 i/o i/o port 2: i/o port. input or output specifiable in units of bits. data: data bus 16 to 23. p30 to p37 d24 to d31 8 i/o i/o port 3: i/o port. input or output specifiable in units of bits. data: data bus 24 to 31. p40 to p47 a0 to a7 8 i/o output port 4: i/o port. input or output specifiable in units of bits. address: address bus 0 to 7. p50 to p57 a8 to a15 8 i/o output port 5: i/o port. input or output specifiable in units of bits. address: address bus 8 to 15. p60 to p67 a16 to a23 8 i/o output port 6: i/o port. input or output specifiable in units of bits. address: address bus 16 to 23. p70 rd 1 output output port 70: output port read: outputs strobe signal to read external memory. p71 wrll 1 output output port 71: output port write: output strobe signal for writing data on pins d0 to d7. p72 wrlu 1 output output port 72: output port write: output strobe signal for writing data on pins d8 to d15. p73 wrul 1 output output port 73: output port write: output strobe signal for writing data on pins d16 to d23. p74 wruu 1 output output port 74: output port write: output strobe signal for writing data on pins d24 to d31. p75 r/ w 1 output output port 75: output port read/write: 1 represents read or dummy cycle; 0 represents write cycle. p76 wait 1 i/o input port 76: i/o port wait: signal used to request cpu bus wait. p80 cs0 sdcsh 1 output output output port 80: output port chip select 0: outputs ?low? when address is within specified address area. chip select for sdram: outputs ?0? when address is within sdram upper-address area. p81 cs1 sdcsl 1 output output output port 81: output port chip select 1: outputs ?low? when address is within specified address area. chip select for sdram: outputs ?0? when address is within sdram lower-address area. p82 cs2 cs2a 1 output output output port 82: output port chip select 2: outputs ?low? when address is within specified address area. expand chip select 2a: outputs ?0? when ad dress is within specified address area. p83 cs3 1 output output port 83: output port chip select 3: outputs ?low? when address is within specified address area. p84 ea24 cs2b 1 output output output port 84: output port chip select 24: outputs ?0? when addre ss is within specified address area. expand chip select 2b: outputs ?0? when ad dress is within specified address area. p85 ea25 cs2c 1 output output output port 85: output port chip select 25: outputs ?0? when addre ss is within specified address area. expand chip select 2c: outputs ?0? when ad dress is within specified address area. p86 cs2d 1 output output port 86: output port expand chip select 2d: outputs ?0? when ad dress is within specified address area. p87 sdclk 1 output output port 87: output port clock for sdram
tmp92c820 2007-02-16 92c820-8 table 2.3.1 pin names and functions (2/3) pin names number of pins i/o functions p90 sck 1 i/o i/o port 90: i/o port serial bus interface clock i/o data at sio mode. p91 so sda 1 i/o output i/o port 91: i/o port serial bus interface send data at sio mode. serial bus interface send/receive data at i 2 c mode. (open drain/output mode by programmable.) p92 si scl 1 i/o input i/o port 92: i/o port serial bus interface receive data at sio mode. serial bus interface clock i/o data at i 2 c mode. (open drain/output mode by programmable.) p93 cs2e 1 i/o output port 93: i/o port expand chip select 2e: outputs ?0? when ad dress is within specified address area. p94 cs2f 1 i/o output port 94: i/o port expand chip select 2f: outputs ?0? when ad dress is within specified address area. p95 cs2g txd2 1 i/o output output port 95: output port expand chip select 2g: outputs ?0? when ad dress is within specified address area. serial transmission data 2. open drain/output pin by programmable. p96 rxd2 csexa 1 i/o input output port 96: output port serial receive data 2. expand chip select exa: outputs ?0? when addr ess is within specified address area. pa0 to pa7 ki0 to ki7 8 input input a0 to a7 port: pin used to input ports. key input 0 to 7: pin used of key-on wakeup 0 to 7. (schmitt input, with pull-up resistor.) pc0 ta0in 1 i/o input port c0: i/o port 8-bit timer 0 input: timer 0 input. pc1 int1 ta1out 1 i/o input output port c1: i/o port interrupt request pin1 : interrupt request pin with programmable rising /falling edge. 8-bit timer 1 output: timer 1 output. pc3 int0 1 i/o input port c3: i/o port interrupt request pin 0: interrupt request pin with programmable level/rising/falling edge. pc5 int2 ta3out 1 i/o input output port c5: i/o port interrupt request pin 2 : interrupt request pin with programmable rising /falling edge. 8-bit timer 3 output: timer 3 output. pc6 int3 tb0out0 1 i/o input output port c6: i/o port interrupt request pin 3: interrupt request pin with programmable rising /falling edge. timer b0 output. pf0 txd0 1 i/o output port f0: i/o port serial 0 send data: open drain/output pin by programmable. pf1 rxd0 1 i/o input port f1: i/o port serial 0 receive data. pf2 sclk0 0 cts 1 i/o i/o input port f2: i/o port serial 0 clock i/o. serial 0 data send enable (clear to send). pf3 txd1 1 i/o output port f3: i/o port serial 1 send data: open drain/output pin by programmable. pf4 rxd1 1 i/o input port f4: i/o port serial 1 receive data. pf5 sclk1 1 cts 1 i/o i/o input port f5: i/o port serial 1 clock i/o. serial 1 data send enable (clear to send). pg0 to pg4 an0 to an4 adtrg 5 input input input port g0 to g4 port: pin used to input ports. analog input 0 to 4: pin used to input to ad conveter. ad trigger: signal used to request ad start (with used to pg3).
tmp92c820 2007-02-16 92c820-9 table 2.3.1 pin names and functions (3/3) pin names number of pins i/o functions pj0 sdras 1 output output port j0: output port row address strobe for sdram: outputs ?0? when address is within sdram address area. pj1 sdcas 1 output output port j1: output port column address strobe for sdram: outputs ?0? when address is within sdram address area. pj2 sdwe srwr 1 output output output port j2: output port write enable for sdram. write for sram: strobe signal for writing data . pj3 sdlldqm srllb 1 output output output port j3: output port data enable for sdram on pins d0 to d7. data enable for sram on pins d0 to d7. pj4 sdludqm srlub 1 output output output port j4: output port data enable for sdram on pins d8 to d15. data enable for sram on pins d8 to d15. pj5 sduldqm srulb 1 output output output port j5: output port data enable for sdram on pins d16 to d23. data enable for sram on pins d16 to d23. pj6 sduudqm sruub 1 output output output port j6: output port data enable for sdram on pins d24 to d32. data enable for sram on pins d24 to d32. pj7 sdcke 1 output output port j7: output port clock enable for sdram. pk0 d1bscp 1 output output port k0: output port lcd driver output pin. pk1 d2blp 1 output output port k1: output port lcd driver output pin. pk2 d3bfr 1 output output port k2: output port lcd driver output pin. pk3 dlebcd 1 output output port k3: output port lcd driver output pin. pk4 doffb 1 output output port k4: output port lcd driver output pin. pk6 alarm mldalm 1 output output output port k6: output port rtc alarm output pin. melody/alarm output pin (inverted). pl0 to pl7 ld0 to ld7 8 i/o output port l0 to l7: i/o port data bus for lcd driver. be 1 input backup enable. am0, am1 2 input operation mode: fix to am1 = ?0?, am0 = ?1?: 16-bit external bus or 8-/16-/32-bit dynamic sizing. fix to am1 = ?1?, am0 = ?0?: 32-bit external bus or 8-/16-/32-bit dynamic sizing. x1/x2 2 i/o high-frequency o scillator connection pins. xt1/xt2 2 i/o low-frequency oscillator connection pins. reset 1 input reset: initializes tmp92c820 (with pull-up resistor). vrefh 1 input pin for reference voltage input to ad converter (h). vrefl 1 input pin for reference voltage input to ad converter (l). avcc 1 ? power supply pin for ad converter. avss 1 ? gnd pin for ad converter (0 v). dvcc 3 ? power supply pins (all dvcc pins should be connected with the power supply pin). dvss 4 ? gnd pins (0 v) (all dvss pins should be connected with gnd (0v)). rtcvcc 1 ? power supply pin for rtc and low-frequency oscillator.
tmp92c820 2007-02-16 92c820-10 3. operation this section describes the bas ic components, functions and operation of the tmp92c820. 3.1 cpu the tmp92c820 contains an advanced high-speed 32-bit cpu (900/h1 cpu). for cpu operation, see the tlcs-900/h1 cpu. the following describe the unique function of the cpu used in the tmp92c820; these functions are not covered in the tlcs-900/h1 cpu section. 3.1.1 cpu outline 900/h1 cpu is high-speed and high-perfo rmance cpu based on 900/l1 cpu. 900/h1 cpu has expanded 32-bit internal data bus to process instructions more quickly. outline of 900/h1 cpu are as follows: table 3.1.1 cpu outline 900/h1 cpu width of cpu address bus 24 bits width of cpu data bus 32 bits internal operating frequency 20 mhz minimum bus cycle 1-clock access (50 ns at 20 mhz) data bus sizing 8/16/32 bits internal ram 32 bits 1-clock access internal i/o 8-/16-bit 8-/16-bit 2-clock access 5 to 6-clock access 900/h1 i/o 900/l1 i/o external device 8 bits 2-clock access (can insert some waits.) minimum instruction execution cycle 1 clock (50 ns at 20 mhz) conditional jump 2 clocks (100 ns at 20 mhz) instruction queue buffer 12 bytes instruction set compatible with tlcs-900, 900/l, 900/h, 900/l1 and 900/h2 (normal, max, min and ldx instruction is deleted.) cpu mode only maximum mode micro dma 8 channels
tmp92c820 2007-02-16 92c820-11 3.1.2 reset operation when resetting the tmp92c820 microcontroller, ensure that the power supply voltage is within the operating voltage range, and that the internal high-frequency oscillator has stabilized. then hold the reset input low for at least 20 system clocks (16 s at 40 mhz). when the reset has been accepted, the cpu performs the following: ? sets the program counter (pc) as follow s in accordance with the reset vector stored at address ffff00h to ffff02h: pc<7:0> data in location ffff00h pc<15:8> data in location ffff01h pc<23:16> data in location ffff02h ? sets the stack pointer (xsp) to 00000000h. ? sets bits of the status register (sr) to 111 (thereby setting the interrupt level mask register to level 7). ? clears bits of the status regi ster to 00 (thereby selecting register bank0). when the reset is released, the cpu starts executing instructions according to the program counter settings. cpu internal regist ers not mentioned above do not change when the reset is released. when the reset is accepted, the cpu sets inte rnal i/o, ports and ot her pins as follows. ? initializes the internal i/o registers as table of ?table of special function registers (sfrs)? in section 5. ? sets the port pins, including the pins that also act as internal i/o, to general-purpose input or output port mode. internal reset is released as soon as external reset is released. the operation of memory controller cannot be insured until power supply becomes stable after power-on reset. the external ram data provided before turning on the tmp92c820 may be spoiled because the control signals are unstable until power supply becomes stable after power on reset.
tmp92c820 2007-02-16 92c820-12 figure 3.1.1 power on reset timing example 3.1.3 setting of am0 and am1 set am1 and am0 pins to ?10? to use 32-bit external bus, or set it to ?01? to use 16-bit external bus. table 3.1.2 operation mode setup table mode setup input pin operation mode reset am1 am0 16-bit external bus or 8-/16-/32-bit dynamic bus sizing 0 1 32-bit external bus or 8-/16-/32-bit dynamic bus sizing 1 0 osc warm-up time + 20 system clock 0 s (min) v cc 3.3 v reset 10 ms (min)
tmp92c820 2007-02-16 92c820-13 3.2 memory map 1h figure 3.2.1 is a memory map of the tmp92c820. 000000h 002000h 16-mbyte area (r) ( ? r) (r + ) (r + r8/16) (r + d8/16) (nnn) direct area (n) 64-kbyte area (nn) internal i/o (8 kbytes) internal ram (8 kbytes) 004000h 010000h ( = internal area) ffff00h ffffffh vector table (256 bytes) external memory 000100h provisional emulator control area (64 kbytes) f00000h f10000h external memory 0 01fe0h (note 1) (note 2) note 1: provisional emulator control area is for em ulator, it is mapped f00000h to f10000h address after reset. note 2: don?t use the last 16-byte area (fffff0h to ffffffh). this area is reserved. note 3: on emulator wr signal and rd signal are asserted, when provis ional emulator control area is accessed. be careful to use external memory. figure 3.2.1 memory map
tmp92c820 2007-02-16 92c820-14 3.3 clock function and standby function tmp92c820 contains (1) clock gear, (2) standby controller, and (3) noise reduction circuit. it is used for low-power, low-noise systems. this chapter is organized as follows: 2h 3.3.1 3h block diagram of system clock 4h 3.3.2 5h sfr 6h 3.3.3 7h system clock controller 8h 3.3.4 9h noise reduction circuits 10h 3.3.5 11h standby controller
tmp92c820 2007-02-16 92c820-15 the clock operating modes are as follows: (a) single clock mode (x1, x2 pins only) and (b) dual clock mode (x1, x2, xt1, and xt2 pins). 12h figure 3.3.1 shows a transition figure. interrupt interrupt instruction instruction interrupt interrupt instruction reset (f osch /32) release reset instruction interrupt stop mode (stops all circuits) idle2 mode (i/o operate) idle1 mode (operate only oscillator) (a) single clock mode transition figure (b) dual clock mode transition figure stop mode (stops all circuits) instruction reset (f osch /32) release reset normal mode (f osch /gear value/2 ) idle2 mode (i/o operate) idle1 mode (operate only oscillator) idle2 mode (i/o operate) idle1 mode (operate only oscillator) interrupt instruction instruction instruction normal mode (f osch /gear value/2) interrupt interrupt instruction instruction slow mode (fs/2) figure 3.3.1 system clock block diagram the clock frequency input from the x1 and x2 pins is called fc and the clock frequency input from the xt1 and xt2 pins is called fs. the clock fr equency selected by syscr1 is called the system clock f fph . the system clock f sys is defined as the divided clock of f fph , and one cycle of f sys is defined to as one state.
tmp92c820 2007-02-16 92c820-16 3.3.1 block diagram of system clock clock gear syscr1 tmra0 to tmra3, tmrb0 fs f osch xt1 xt2 warm-up timer (high-/low-frequency oscillator) syscr0 syscr2 x1 x2 2 16 4 8 fc/16 fc/8 fc/4 fc/2 fc syscr1 4 8 f fph f sys 2 f sys wdt prescaler t0 sio0 to sio2 prescaler t0 fs syscr0 sbi prescaler rtc mld/alm t fs t 2 f io f io cpu ram interrupt controller adc i/o ports sdramc lcdc syscr0 low-frequency oscillator high-frequency oscillator figure 3.3.2 block diag ram of system clock
tmp92c820 2007-02-16 92c820-17 3.3.2 sfr 7 6 5 4 3 2 1 0 bit symbol xen xten wuef read/write r/w r/w after reset 1 1 0 function high-frequency oscillator (fc) 0: stop 1: oscillation low-frequency oscillator (fs) 0: stop 1: oscillation warm-up timer 0: write don?t care 1: write start timer 0: read end warm up 1: read do not end warm up bit symbol sysck gear2 gear1 gear0 read/write r/w after reset 0 1 0 0 function select system clock. 0: fc 1: fs select gear value of high frequency (fc) 000: fc 001: fc/2 010: fc/4 011: fc/8 100: fc/16 101: 110: reserved 111: bit symbol ? wuptm1 wuptm0 haltm1 haltm0 seldrv drve read/write r/w r/w after reset 0 1 0 1 1 0 0 function always write ?0?. warm-up timer 00: reserved 01: 2 8 /inputted frequency 10: 2 14 /inputted frequency 11: 2 16 /inputted frequency halt mode 00: reserved 01: stop mode 10: idle1 mode 11: idle2 mode mode select 0: stop 1: idle1 pin state control in stop/ idle1 mode 0: i/o off 1: remains the state before halt. note 1: the unassigned register, syscr0, syscr0, syscr1, and syscr2 are read as undefined value. note 2: by reset, low-fr equency oscillator is enabled. figure 3.3.3 sfr for system clock syscr0 (10e0h) syscr1 (10e1h) syscr2 (10e2h)
tmp92c820 2007-02-16 92c820-18 7 6 5 4 3 2 1 0 bit symbol protect extin drvosch drvoscl read/write r r/w after reset 0 0 1 1 function protect flag 0: off 1: on 1: fc external clock fc oscillator drive ability 1: normal 0: weak fs oscillator drive ability 1: normal 0: weak bit symbol read/write after reset function switching the protect on/off by write to following 1st-key, 2nd-key 1st-key: emccr1 = 5ah, emccr2 = a5h in succession write 2nd-key: emccr1 = a5h, emccr2 = 5ah in succession write figure 3.3.4 sfr for noise-reduction note: in casewhen restarting the oscillator in from the stop oscillation state (e.g. restart restarting the oscillator in stop mode), set emccr0, =?1?. emccr0 (10e3h) emccr1 (10e4h) emccr2 (10e5h)
tmp92c820 2007-02-16 92c820-19 3.3.3 system clock controller the system clock controller gene rates the system clock signal (f sys ) for the cpu core and internal i/o. it contains two oscillation circu its and a clock gear circuit for high-frequency (fc) operation. the register syscr1 changes the system clock to either fc or fs, syscr0 and syscr0 control enabling and disabling of each oscillator, and syscr1 sets the high-frequency clock gear to either 1, 2, 4, 8, or 16 (fc, fc/2, fc/4, fc/8, or fc/16). these functions can redu ce the power consumption of the equipment in which the device is installed. the combination of settings = 1, = 1, = 0 and = 100 will cause the system clock (f sys ) to be set to fc/32 (fc/16 1/2) after reset. for example, f sys is set to 1.25 mhz when the 40 mhz oscillator is connected to the x1 and x2 pins. (1) switching from normal mode to slow mode when the resonator is connected to the x1 and x2 pins, or to the xt1 and xt2 pins, the warm-up timer can be used to change the operation frequency after stable oscillation has been attained. the warm-up time can be selected using syscr2. this warm-up timer can be programmed to start and stop as shown in the following examples 1 and 2. 13h table 3.3.1 shows the warm-up time. note 1: when using an oscillator (other than a resonator) with stable oscillation, a warm-up timer is not needed. note 2: the warm-up timer is operated by an oscillation clock. hence, there may be some variation in warm-up time. table 3.3.1 warm-up times warm-up time syscr2 change to normal mode (fc) change to slow mode (fs) 01 (2 8 /frequency) 6.4 [ s] 7.8 [ms] 10 (2 14 /frequency) 409.6 [ s] 500 [ms] 11 (2 16 /frequency) 1.638 [ms] 2000 [ms] at f osch = 40 mhz, fs = 32.768 khz
tmp92c820 2007-02-16 92c820-20 example 1: setting the clock changing from high frequency (fc) to low frequency (fs). syscr0 equ 10e0h syscr1 equ 10e1h syscr2 equ 10e2h ld (syscr2), 0x11 - - - - b ; sets warm-up time to 2 16 /fs. set 6, (syscr0) ; enables low-frequency oscillation. set 2, (syscr0) ; clears and starts warm-up timer. wup: bit 2, (syscr0) ; jr nz, wup ; detects stopping of warm-up timer. set 3, (syscr1) ; changes f sys from fc to fs. res 7, (syscr0) ; disables high-frequency oscillation. x: don?t care, ? : no change enables low frequenc y clears and starts warm-up time r chages f sys from fc to fs end of warm-up time r disables high frequenc y fc x1 and x2 pins xt1 and xt2 pins warm-up timer system clock f sys end of warm-up timer fs counts up by fs counts up by f sys
tmp92c820 2007-02-16 92c820-21 example 2: setting the clock changing from low frequency (fs) to high frequency (fc). syscr0 equ 10e0h syscr1 equ 10e1h syscr2 equ 10e2h ld (syscr2), 0x10 - - - - b ; sets warm-up time to 2 14 /fc. set 7, (syscr0) ; enables high-frequency oscillation. set 2, (syscr0) ; clears and starts warm-up timer. wup: bit 2, (syscr0) ; jr nz, wup ; detects stopping of warm-up timer. res 3, (syscr1) ; changes f sys from fs to fc. res 6, (syscr0) ; disables low-frequency oscillation. x: don?t care, ? : no change counts up by f sys counts up by fc disables low frequency enables high frequency clears and starts warm-up timer chages f sys from fs to fc end of warm-up timer x1 and x2 pins xt1 and xt2 pins warm-up timer system clock f sys end of warm-up timer fc fs
tmp92c820 2007-02-16 92c820-22 (2) clock gear controller f fph is set according to the contents of the clock gear select register syscr1 to either fc, fc /2, fc/4, fc/8 or fc/16. using the clock gear to select a lower value of f fph reduces power consumption. example 3: changing to a high-frequency gear syscr1 equ 10e1h ld (syscr1), xxxx0000b ; changes f sys to fc/2. x: don?t care (high-speed clock gear changing) to change the clock gear, write the register value to the syscr1 register. it is necessary the warm-up time until changing after writing the register value. there is the possibility that the instruction next to the clock gear changing instruction is executed by the clock gear before changing. to execute the instruction next to the clock gear switching instruction by the clock gear afte r changing, input the dummy instruction as follows (instruction to execute the write cycle). (example) syscr1 equ 10e1h ld (syscr1), xxxx0001b ; changes f sys to fc/4. ld (dummy), 00h ; dummy instruction instruction to be executed after clock gear has changed
tmp92c820 2007-02-16 92c820-23 3.3.4 noise reduction circuits noise reduction circuits are built in, allowing implementation of the following features. (1) reduced drivability for hi gh-frequency oscillator (2) reduced drivability for low-frequency oscillator (3) single drive for high-frequency oscillator (4) runaway provision with sfr protection register (1) reduced drivability for hi gh-frequency oscillator (purpose) reduces noise and power for oscillator when a resonator is used. (block diagram) (setting method) the drivability of the oscillator is reduced by writing ?0? to emccr0 register. by reset, is initialized to ?1? and the oscillator starts oscillation by normal drive ability when the power supply is on. note: this function (emccr0 = ?0?) is available to use in case ofwhen f osch = 6 to 10 mhz condition. f osch enable oscillation ( stop + emccr0 ) emccr0 x1 p in x2 p in c1 c2 resonator
tmp92c820 2007-02-16 92c820-24 (2) reduced drivability for low-frequency oscillator (purpose) reduces noise and power for oscillator when a resonator is used. (block diagram) (setting method) the drivability of the oscillator is reduced by writing 0 to the emccr0 register. by reset, is initialized to ?1?. (3) single drive for high-frequency oscillator (purpose) not need twin-drive and protect mistake operation by inputted noise to x2 pin when the external oscillator is used. (block diagram) (setting method) the oscillator is disabled and starts operation as buffer by writing ?1? to emccr0 register. x2 pi n is always outputted ?1?. by reset, is initialized to ?0?. f s enable oscillation emccr0 xt1 pin xt2 pin c1 c2 resonator enable oscillation ( stop + emccr0 ) f osch emccr0 x1 pin x2 pin
tmp92c820 2007-02-16 92c820-25 (4) runaway provision with sfr protection register (purpose) provision in runaway of program by noise mixing. write operation to specified sfr is prohibited so that provision program in runaway prevents that it is it in the state which is fetch impossibility by stopping of clock, memory control register (memory controller, mmu) is changed. and error handling in runaway beco mes easy by intp0 interruption. specified sfr list 1. memory controller b0csl/h, b1csl/h, b2cs l/h, b3csl/h, becsl/h msar0, msar1, msar2, msar3, mamr0, mamr1, mamr2, mamr3, pmemcr 2. mmu local 0/1/2/3 3. clock gear syscr0, syscr1, syscr2, emccr0 ( operation explanation) execute and release of protection (write operation to specified sfr) become possible by setting up a double ke y to emccr1 and emccr2 register. (double key) 1st-key: succession writes in 5ah at emccr1 and a5h at emccr2 2nd-key: succession writes in a5h at emccr1 and 5ah at emccr2 a state of protection can be confirmed by reading emccr0. by reset, protection becomes off. and intp0 interruption occurs when write operation to specified sfr was executed with protection on state.
tmp92c820 2007-02-16 92c820-26 3.3.5 standby controller (1) halt modes when the halt instruction is executed, the operating mode switches to idle2, idle1 or stop mode, depending on the contents of the syscr2 register. the subsequent actions performed in each mode are as follows: 1. idle2: only the cpu halts. the internal i/o is available to select operation during idle2 mode by setting the following register. 14h table 3.3.2 shows the registers of setting operation during idle2 mode. table 3.3.2 sfr setting operation during idle2 mode internal i/o sfr tmra01 ta01run tmra23 ta23run tmrb0 tb0run sio0 sc0mod1 sio1 sc1mod1 ad converter admod1 wdt wdmod sbi sbi0br0 2. idle1: only the oscillator, the rtc (real time clock) and mld (melody-alarm generator) continue to operate. 3. stop: all internal circuits stop operating. the operation of each of the different halt modes is described in 15h table 3.3.3. table 3.3.3 i/o operation during halt modes halt modes idle2 idle1 stop syscr2 11 10 01 cpu stop i/o ports keep the state when the halt instruction was executed. see 16h table 3.3.6, 17h table 3.3.7 and 18h table 3.3.8 tmra, tmrb sio, sbi (note) ad converter wdt available to select operation block (note) lcdc, sdramc interrupt controller stop block rtc, mld operate operate note: prohibited in the synchronous mode of sbi circuit.
tmp92c820 2007-02-16 92c820-27 (2) how to release the halt mode these halt states can be released by resetting or requesting an interrupt. the halt release sources are determined by the comb ination between the states of interrupt mask register and th e halt modes. the details for releasing the halt status are shown in 19h table 3.3.4. 1. released by requesting an interrupt the operating released from the halt mode depends on the interrupt enabled status. when the interrupt request level set before executing the halt instruction exceeds the value of interrupt mask register, the interrupt due to the source is processed after releasing the halt mode, and cpu status executing an instruction that follows the halt instruction. when the interrupt request level set before executing the halt instruction is less than the value of the interrupt mask register, releasing the halt mode is not executed . (in non-maskable interrupts, interrupt processing is processed after releasing the halt mode regardless of the value of the mask register.) however only for int0 to int3, intkey, intrtc, and intalm0 to intalm4 interrupts, even if the interrupt request level set before executing the halt instruction is less than the value of the in terrupt mask register, releasing the halt mode is executed. in this case, interrupt processing, and cpu starts executing the instruction next to the halt instruction, but the interrupt request flag is held at ?1?. note: usually, interrupts can release all halts status. however, the interrupts (int0 to int3, intkey, intrtc, inta lm0 to intalm4) which can release the halt mode may not be able to do so if they are input during the period cpu is shifting to the halt mode (for about 3 clocks of f fph ) with idle1 or stop mode (idle2 is not applicable to this case). (in this case, an in terrupt request is kept on hold internally.) if another interrupt is generated after it has shifted to halt mode completely, halt status can be released without difficulty. the priority of this interrupt is compared with that of the interrupt kept on hold inte rnally, and the interrupt with higher priority is handled first followed by the other interrupt. 2. releasing by resetting releasing all halt status is executed by resetting. when the stop mode is released by reset, it is necessary enough resetting time (see 20h table 3.3.5) to set the operation of the oscillator to be stable. when releasing the halt mode by resetting, the internal ram data keeps the state before the ?halt? instruction is executed. however the other settings contents are initialized. (releasing due to interrupts keeps the state before the ?halt? instruction is executed.)
tmp92c820 2007-02-16 92c820-28 table 3.3.4 source of halt state cl earance and halt clearance operation status of received interrupt interrupt enabled (interrupt level) (interrupt mask) interrupt disabled (interrupt level) < (interrupt mask) halt mode idle2 idle1 stop idle2 idle1 stop intwdt ? ? ? ? int0 to 3 (note1) ? ? ? * 1 * 1 intalm0 to 4 ? ? intta0 to 3, inttb00 to 01 ? intrx0 to 2, tx0 to 2 ? intss0 to 2 ? intad ? intkey ? ? ? * 1 * 1 intrtc ? ? intsbe0 ? interrupt intlcd ? source of halt state clearance reset initialize lsi ? : after clearing the halt mode, cpu starts interrupt processing. : after clearing the halt mode, cpu resumes execut ing starting from instruction following the halt instruction. : it can not be used to release the halt mode. ? : the priority level (interrupt request level) of non-ma skable interrupts is fixed to 7, the highest priority level. there is not this combination type. * 1: releasing the halt mode is executed after passing the warm-up time. note 1: when the halt mode is cleared by an int0 interrupt of the level mode in the interrupt enabled status, hold level h until starting interrupt processing. if level l is set before holding level l, interrupt processing is correctly started. (example releasing idle1 mode) an int0 interrupt clears the halt stat e when the device is in idle1 mode. address 8200h ld (pcfc), 04h ; sets pc3f to int0. 8203h ld (iimc), 00h ; selects int0 interrupt rising edge. 8206h ld (inte0ad), 06h ; sets int0 interrupt level to 6. 8209h ei 5 ; sets interrupt level to 5 for cpu. 820bh ld (syscr2), 28h ; sets halt mode to idle1 mode. 820eh halt ; halts cpu. int0 int0 interrupt routine reti 820fh ld xx, xx
tmp92c820 2007-02-16 92c820-29 (3) operation 1. idle2 mode in idle2 mode only specific internal i/o operations, as designated by the idle2 setting register, can take place. instruction execution by the cpu stops. 21h figure 3.3.5 illustrates an example of the timing for clearance of the idle2 mode halt state by an interrupt. interrupt o f releasing halt idle2 mode data data x1 a0 to a23 d0 to d15 rd wr figure 3.3.5 timing chart for idle2 mo de halt state cleared by interrupt 2. idle1 mode in idle1 mode, only the internal oscillator and the rtc and mld continue to operate. the system clock in the mcu stops. the pin status in the idle1 mode is depended on setting the register syscr2. 22h table 3.3.6 , 0h23h table 3.3.7 and 24h table 3.3.8 summarizes the state of these pins in the idle1 mode. in the halt state, the interrupt request is sampled asynchronously with the system clock; however, clearance of the halt state (e.g., restart of operation) is synchronous with it. 25h figure 3.3.6 illustrates the timing for clearance of the idle1 mode halt state by an interrupt. idle1 mode data data x1 a0 to a23 d0 to d15 rd wr interrupt o f releasing halt figure 3.3.6 timing chart for idle1 mo de halt state cleared by interrupt
tmp92c820 2007-02-16 92c820-30 3. stop mode when stop mode is selected, all internal circuits stop, including the internal oscillator pin status in stop mode depends on the settings in the syscr2 register. 26h table 3.3.6, 27h table 3.3.7 and 28h table 3.3.8 summarizes the state of these pins in stop mode. after stop mode has been cleared system clock output starts when the warm-up time has elapsed, in order to allow oscillation to stabilize. 29h figure 3.3.7 illustrates the timing for clearance of the stop mode halt state by an interrupt. interrupt o f releasing halt data data stop mode x1 a0 to a23 d0 to d15 rd wr warm-up time figure 3.3.7 timing chart for stop mo de halt state cleared by interrupt table 3.3.5 sample warm-up times after clearance of stop mode at f osch = 40 mhz, fs = 32.768 khz syscr2 syscr0 01 (2 8 ) 10 (2 14 ) 11 (2 16 ) 0 (fc) 6.4 s 409.6 s 1.638 ms
tmp92c820 2007-02-16 92c820-31 table 3.3.6 input buffer state table input buffer state in halt mode (idle1/stop) when the cpu is operating in halt mode (idle2) condition a (note) condition b (note) port name input function name during reset when used as function pin when used as input pin when used as function pin when used as input pin when used as function pin when used as input pin when used as function pin when used as input pin d0-d7 d0-d7 ? ? ? ? p10-p17 d8-d15 off p20-p27 d16-d23 p30-p37 d24-d31 16-bit start :on 32-bit start :off on upon external read on upon external read of lcdc off off p40-p47 ? p50-p57 ? p60-p67 ? off ? ? ? ? p76 wait off p90 sck p91 sda p92 si, scl on on off off p93 ? p94 ? p95 ? ? ? off ? ? p96 rxd2 off off off off pa0-pa7 (*1) ki0-7 on on on on on pc0 ta0in off off pc1 int1 off off off pc3 int0 on on on pc5 int2 pc6 int3 on on on on pf0 ? ? ? off ? ? pf1 rxd0 pf2 sclk0, cts0 on on on off off pf3 ? ? ? off ? ? pf4 rxd1 pf5 sclk1, cts1 on on on on on off off pg0-pg2, pg4 (*2) ? ? ? ? ? pg3 (*2) adtrg off on on upon port read on on on pl0-pl7 ? ? on ? off ? off ? off be ? reset (*1) ? am0, am1 ? on ? on ? x1, xt1 on on ? on ? idle1 : on , stop : off on: the buffer is always turned on. a current flows the input buffer if the input pin is not driven. *1: port having a pull-up/pull-down resistor. off: the buffer is always turned off. *2: ain input does not cause a current to flow through the buffer. -: no applicable note: condition a/b are as follows. syscr2 register setting halt mode idle1 stop 0 0 condition b 0 1 condition a condition a 1 0 1 1 condition b condition b
tmp92c820 2007-02-16 92c820-32 table 3.3.7 output buffer state table (1/2) output buffer state in halt mode (idle1/stop) when the cpu is operating in halt mode (idle2) condition a (note) condition b (note) port name output function name during reset when used as function pin when used as output port when used as function pin when used as output port when used as function pin when used as output port when used as function pin when used as output port d0-d7 d0-d7 ? ? ? ? p10-p17 d8-d15 p20-p27 d16-d23 p30-p37 d24-d31 off on upon external write off on off p40-p47 a0-a7 p50-p57 a8-a15 p60-p67 a16-a23 p70 rd p71 wrll p72 wrlu p73 wrul p74 wruu p75 r/w on on on off on p76 ? off ? ? ? ? p80 cs0, sdcsh p81 cs1, sdcsl p82 cs2, cs2a p83 cs3 p84 ea24, cs2b p85 ea25, cs2c p86 cs2d p87 sdclk on p90 sck p91 so p92 scl p93 cs2e p94 cs2f p95 cs2g txd2 p96 csexa on on off on pc0 ? ? ? ? ? pc1 ta1out on on off on pc3 ? ? ? ? ? pc5 ta3out pc6 tb0out off on on on on off off on on
tmp92c820 2007-02-16 92c820-33 table 3.3.8 output buffer state table (2/2) output buffer state in halt mode (idle1/stop) when the cpu is operating in halt mode (idle2) condition a (note) condition b (note) port name output function name during reset when used as function pin when used as output port when used as function pin when used as output port when used as function pin when used as output port when used as function pin when used as output port pf0 txd0 on on off pf1 ? ? ? ? ? pf2 sclk0 pf3 txd1 on on off on pf4 ? ? ? ? ? pf5 sclk1 pj0 sdras pj1 sdcas pj2 sdwe srwr pj3 sdlldqm srllb pj4 sdludqm srlub pj5 sduldqm srulb pj6 sduudqm sruub off pj7 sdcke on in self refresh cycle pk0 d1bscp pk1 d2blp pk2 d3bfr pk3 dlebcd pk4 doffb pk6 alarm mldalm pl0-pl7 ld0-ld7 off on on off off on on x2 ? idle1: on, stop: output ?h? level xt2 ? on on ? on ? idle1: on, stop: high-z on: the buffer is always turned on. when the bus is released, however, output buffers for some pins are turned off. *1: port having a pull-up/pull-down resistor. off: the buffer is always turned off. -: no applicable note: condition a/b are as follos. syscr2 register setting halt mode idle1 stop 0 0 condition b 0 1 condition a condition a 1 0 1 1 condition b condition b
tmp92c820 2007-02-16 92c820-34 3.4 interrupts interrupts are controlled by the cpu interrupt mask register (bits 12 to 14 of the status register) and by the built-in interrupt controller. the tmp92c820 has a total of 45 interrupts divided into the following five types: interrupts generated by cpu: 9 sources ? software interrupts: 8 sources ? illegal instruction interrupt: 1 source internal interrupts: 31 sources ? internal i/o interrupts: 23 sources ? micro dma transfer end interrupts: 8 sources external interrupts: 5 sources ? interrupts on external pins (int0 to int3, intkey) a fixed individual interrupt vector number is assigned to each interrupt source. any one of six levels of priority can also be assigned to each maskable interrupt. non-maskable interrupts have a fixed priority level of 7, the highest level. when an interrupt is generated, the interrupt controller sends the priori ty of that interrupt to the cpu. when more than one interrupt are generated simultaneously, the interrupt controller sends the priority value of the interrupt is with the highest priority to the cpu. (the highest priority level is 7, the level used for non-maskable interrupts.) the cpu compares the interrupt priority level wh ich it receives with the value held in the cpu interrupt mask register . if the prio rity level of the interrupt is greater than or equal to the value in the interrupt mask register, the cpu accepts the interrupt. however, software interrupts and illegal in struction interrupts generated by the cpu are processed irrespective of the value in . the value in the interrupt mask register can be changed using the ei instruction (ei num sets to num). for example, the command ei3 enables the acceptance of all non-maskable interrupts and of maskable interru pts whose priority level, as set in the interrupt controller, is 3 or higher. the commands ei and ei0 enable the acceptance of all non-maskable interrupts an d of maskable interrupts with a priority level of 1 or above (hence both are equivalent to the command ei1). the di instruction (sets to 7) is exactly equivalent to the ei7 instruction. the di instruction is used to disable all maskable interrupts (since the priority level for maskable interrupts ranges from 1 to 6). the ei instruction takes effect as soon as it is executed. in addition to the general-purpose interrupt processing mode described above, there is also a micro dma processing mode. in micro dma mode the cpu automatically transfers data in one-byte, two-byte or four-byte blocks; this mode allows high-speed data transfer to and from internal and external memory and internal i/o ports. in addition, the tmp92c820 also has a soft ware start function in which micro dma processing is requested in software rather than by an interrupt. 0h figure 3.4.1 is a flowchart showing overall interrupts processing.
tmp92c820 2007-02-16 92c820-35 figure 3.4.1 interrupt and micro dma processing sequence yes push pc push sr sr level of accepted interrupt + 1 intnest intnest + 1 end pc (ffff00h + v) interrupt processing program count count ? 1 data transfer by micro dma no micro dma processing reti instruction pop sr pop pc intnest intnest ? 1 interrupt specified by micro dma start vector? clear vector register generating micro dma transfer end interrupt (inttc0 to inttc7) clear interrupt request flag interrupt vector value ?v? read interrupt request f/f clear interrupt processing count = 0 yes no general-purpose interrupt processing micro dma soft start request
tmp92c820 2007-02-16 92c820-36 3.4.1 general-purpose interrupt processing when the cpu accepts an interrupt, it us ually performs the following sequence of operations. however, in the case of software interrupts and illegal instruction interrupts generated by the cpu, the cpu sk ips steps (1) and (3), and executes only steps (2), (4), and (5). (1) the cpu reads the interrupt vector from the interrupt controller. when more than one interrupt with the same priority level has been generated simultaneously, the interrupt controller generates an interrupt vector in accordance with the default priority and clears the interrupt requests. (the default priority is determined as follows: the smaller the vector value, the higher the priority.) (2) the cpu pushes the program counter (pc) and status register (sr) onto the top of the stack (pointed to by xsp). (3) the cpu sets the value of the cpu?s interrupt mask register to the priority level for the accepted interrupt plus 1. howe ver, if the priority level for the accepted interrupt is 7, the register?s value is set to 7. (4) the cpu increments the interrupt nesting counter intnest by 1. (5) the cpu jumps to the address given by adding the contents of address ffff00h + the interrupt vector, then starts the interrupt processing routine. on completion of interrupt processing, the reti instruction is used to return control to the main routine. reti restores the contents of the program counter and the status register from the stack and decrements the interrupt nesting counter intnest by 1. non-maskable interrupts cannot be disabled by a user program. maskable interrupts, however, can be enabled or disabled by a user program. a program can set the priority level for each interrupt source. (a priority level setting of 0 or 7 will disable an interrupt request.) if an interrupt request is received for an interrupt with a priority level equal to or greater than the value set in the cpu interrupt mask register , the cpu will accept the interrupt. the cpu interrupt mask register is then set to the value of the priority level for the accepted interrupt plus 1. if during interrupt processing, an interrupt is generated with a higher priority than the interrupt currently being processed, or if, during the processing of a non-maskable interrupt processing, a non-maskable interrupt request is generated from another source, the cpu will suspend the routine which it is currently executing and accept the new interrupt. when processing of the new interrupt has been completed, the cpu will resume processing of the suspended interrupt. if the cpu receives another interrupt request while performing processing steps (1) to (5), the new interrupt will be sampled immediately af ter execution of the first instruction of its interrupt processing routine. specifying di as the start instruction disables nesting of maskable interrupts. a reset, initializes the interrupt mask register to 111, disabling all maskable interrupts. 1h table 3.4.1 shows the tmp92c820 interrupt vectors and micro dma start vectors. ffff00h to ffffffh (256 bytes) is designat ed as the interrupt vector area.
tmp92c820 2007-02-16 92c820-37 table 3.4.1 tmp92c820 interrupt vect ors and micro dma start vectors (1/2) default priority type interrupt source and source of micro dma request vector value address refer to vector micro dma start vector 1 reset or [swi0] instruction 0000h ffff00h 2 [swi1] instruction 0004h ffff04h 3 illegal instruction or [swi2] instruction 0008h ffff08h 4 [swi3] instruction 000ch ffff0ch 5 [swi4] instruction 0010h ffff10h 6 [swi5] instruction 0014h ffff14h 7 [swi6] instruction 0018h ffff18h 8 [swi7] instruction 001ch ffff1ch 9 (reserved) 0020h ffff20h 10 non maskable intwd: watchdog timer 0024h ffff24h ? micro dma ? ? ? (note 1) 11 int0: int0 pin input 0028h ffff28h 0ah (note 2) 12 int1: int1 pin input 002ch ffff2ch 0bh 13 int2: int2 pin input 0030h ffff30h 0ch 14 int3: int3 pin input 0034h ffff34h 0dh 15 (reserved) 0038h ffff38h 0eh 16 intalm0: alm0 (8 khz) 003ch ffff3ch 0fh 17 intalm1: alm1 (512 hz) 0040h ffff40h 10h 18 intalm2: alm2 (64 hz) 0044h ffff44h 11h 19 intalm3: alm3 (2 hz) 0048h ffff48h 12h 20 intalm4: alm4 (1 hz) 004ch ffff4ch 13h 21 intp0: protect 0 (wr to sfr) 0050h ffff50h 14h 22 (reserved) 0054h ffff54h 15h 23 intta0: 8-bit timer 0 0058h ffff58h 16h 24 intta1: 8-bit timer 1 005ch ffff5ch 17h 25 intta2: 8-bit timer 2 0060h ffff60h 18h 26 intta3: 8-bit timer 3 0064h ffff64h 19h 27 inttb0: 16-bit timer 0 0068h ffff68h 1ah 28 inttb1: 16-bit timer 0 006ch ffff6ch 1bh 29 intkey: key wakeup 0070h ffff70h 1ch 30 intrtc: rtc (alarm interrupt) 0074h ffff74h 1dh 31 inttbo0: 16-bit timer 0 (overflow) 0078h ffff78h 1eh 32 intlcd: lcdc/lp pin 007ch ffff7ch 1fh 33 intrx0: serial receive (channel 0) 0080h ffff80h 20h (note 2) 34 inttx0: serial transmission (channel 0) 0084h ffff84h 21h 35 intrx1: serial receive (channel 1) 0088h ffff88h 22h (note 2) 36 inttx1: serial transmission (channel 1) 008ch ffff8ch 23h 37 intrx2: serial receive (channel 2) 0090h ffff90h 24h (note 2) 38 inttx2: serial transmission (channel 2) 0094h ffff94h 25h 39 (reserved) 0098h ffff98h 26h 40 (reserved) 009ch ffff9ch 27h 41 (reserved) 00a0h ffffa0h 28h 42 (reserved) 00a4h ffffa4h 29h 43 (reserved) 00a8h ffffa8h 2ah 44 (reserved) 00ach ffffach 2bh 45 (reserved) 00b0h ffffb0h 2ch 46 (reserved) 00b4h ffffb4h 2dh 47 (reserved) 00b8h ffffb8h 2eh 48 intsbe0: sbi i 2 c bus transfer end (channel 0) 00bch ffffbch 2fh 49 (reserved) 00c0h ffffc0h 30h 50 maskable (reserved) 00c4h ffffc4h 31h
tmp92c820 2007-02-16 92c820-38 table 3.4.1 tmp92c820 interrupt vect ors and micro dma start vectors (2/2) default priority type interrupt source and source of micro dma request vector value address refer to vector micro dma start vector 51 (reserved) 00c8h ffffc8h 32h 52 intad: ad conversion end 00cch ffffcch 33h 53 inttc0: micro dma end (channel 0) 00d0h ffffd0h 34h 54 inttc1: micro dma end (channel 1) 00d4h ffffd4h 35h 55 inttc2: micro dma end (channel 2) 00d8h ffffd8h 36h 56 inttc3: micro dma end (channel 3) 00dch ffffdch 37h 57 inttc4: micro dma end (channel 4) 00e0h ffffe0h 38h 58 inttc5: micro dma end (channel 5) 00e4h ffffe4h 39h 59 inttc6: micro dma end (channel 6) 00e8h ffffe8h 3ah 60 inttc7: micro dma end (channel 7) 00ech ffffech 3bh ? to ? maskable (reserved) 00f0h : 00fch fffff0h : fffffch ? ? note 1: micro dma default priority. micro dma initiation ta kes priority over other maskable interrupt. note 2: when initiating micro dma, set at edge detect mode.
tmp92c820 2007-02-16 92c820-39 3.4.2 micro dma processing in addition to general-purpose interrupt processing, the tmp92c820 also includes a micro dma function. micro dma processing fo r interrupt requests set by micro dma is performed at the highest priority level for maskable interrupts (level 6), regardless of the priority level of the interrupt source. because the micro dma function is implemented though the cpu, when the cpu is placed in a state of standby by halt instruction, the requirements of the micro dma will be ignored (pending). micro dma supports 8 channels and can be tr ansferred continuously by specifying the micro dma burst function as below. (1) micro dma operation when an interrupt request is generated by an interrupt source specified by the micro dma start vector register, the micro dma tr iggers a micro dma request to the cpu at interrupt priority level 6 and starts processing the request. the eight micro dma channels allow micro dma proce ssing to be set for up to 8 types of interrupt at once. when micro dma is accepted, the interrupt request flip-flop assigned to that channel is cleared. data in one-byte, two-byte or four-byte blocks, is automatically transferred at once from the transfer source address to the transfer destination address set in the control register, and the tr ansfer counter is decremented by 1. if the value of the counter after it has been decremented is not 0, dma processing ends with no change in the value of the micro dma start vector register. if the value of the decremented counter is 0, a micro dma transfer end interrupt (inttc0 to inttc7) is sent from the cpu to the interrupt controll er. in addition, the micro dma start vector register is cleared to 0, the next micro dma operation is disabled and micro dma processing terminates. if micro dma requests are set simultaneously for more than one channel, priority is not based on the interrupt priority level but on the channel number: the lower the channel number, the higher the priority (channel 0 thus has the highest priority and channel 7 the lowest). if an interrupt request is triggered for the interrupt source in use during the interval between the time at which the micro dma start vector is cleared and the next setting, general-purpose interrupt processing is performed at the interrupt level set. therefore, if the interrupt is only being used to initiate micro dma (and not as a general-purpose interrupt), the interrupt level should first be set to 0 (j.e, interrupt requests should be disabled). if micro dma and general-purpose interrupt s are being used together as described above, the level of the interrupt which is being used to initiate micro dma processing should first be set to a lower value than all the other interrupt levels. (note) in this case, edge-triggered interrupts are the only kinds of general interrupts which can be accepted. note: if the priority level of micro dma is set higher than that of other interrupts, cpu operates as follows. in case intxxx interrupt is generated first and then intyyy interrupt is generated between checking ?interrupt specified by micro dma start vector? (in the 2h figure 3.4.1) and reading interrupt vector with setting below. the vector shifts to that of intyyy at the time. this is because the priority level of intyyy is higher than that of intxxx. in the interrupt routine, cpu reads the vector of intyyy because cheking of micro dma has finished. and intyyy is generated regardless of transfer counter of micro dma. intxxx: level 1 without micro dma intyyy: level 6 with micro dma
tmp92c820 2007-02-16 92c820-40 although the control registers used for se tting the transfer source and transfer destination addresses are 32 bits wide, this type of register can only output 24-bit addresses. accordingly, micro dma can only access 16 mbytes (the upper 8 bits of a 32-bit address are not valid). three micro dma transfer modes are supported: one-byte transfer, two-byte (one word) transfers and four-byte transfers. after a transfer in any mode, the transfer source and transfer destinatio n addresses will either be incremented or decremented, or will remain unchanged. this simplifies th e transfer of data from i/o to memory, from memory to i/o, and from i/o to i/o. for details of the various transfer modes, see section 3.4.2 (4) ?detailed descriptio n of the transfer mode register?. since a transfer counter is a 16-bit counter, up to 65536 micro dma processing operations can be performed per interrupt so urce (provided that the transfer counter for the source is initially set to 0000h). micro dma processing can be initiated by any one of 34 different interrupts ? the 33 interrupts shown in the micro dma start vectors in 3h table 3.4.1 and a micro dma soft start. 4h figure 3.4.2 shows a 2-byte transfer carried out using a micro dma cycle in transfer destination address inc mode (micro dma transfers are the same in every mode except counter mode). (the conditions for this cycle are as follows: external 8-bit bus, 0 waits, and even-numbered transfer source and transfer destination addresses). note: in fact, src and dst address are not output to a23 to a0 pins because they are internal ram address states 1 and 2: instruction fetch cycle (prefetches the next instruction code) if the instruction queue buffer is full, this cycle becomes a dummy cycle. state 3: micro dma read cycle. state 4: micro dma write cycle. state 5: (the same as in state 1, 2.) figure 3.4.2 timing for micro dma cycle src dst clk a0 to a23 one state 1 2 3 4 5
tmp92c820 2007-02-16 92c820-41 (2) soft start function the tmp92c820 can initiate micro dma either with an interrupt or by using the micro dma soft start function, in which micro dma is initiated by a write cycle which writes to the register dmar. writing 1 to any bit of the register dmar causes micro dma to be performed once. (if write ?0? to each bit, micro dma doesn?t operate). on completion of the transfer, the bits of dmar which support the end channel are automatically cleared to 0. only one channel can be set for dma request at once. (do not write ?1? to plural bits.) when writing again 1 to the dmar register, check whether the bit is ?0? before writing ?1?. if read ?1?, micro dma transfer isn?t started yet. when a burst is specified by the dmab re gister, data is transferred continuously from the initiation of micro dma until the value in the micro dma transfer counter is 0. if execatee soft start during micro dma transfer by interrupt source, micro dma transfer counter doesn?t change. don?t use read-modify-write instruction to avoid writign to other bits by mistake. symbol name address 7 6 5 4 3 2 1 0 dreq7 dreq6 dreq5 dreq4 dre q3 dreq2 dreq1 dreq0 r/w 0 0 0 0 0 0 0 0 dmar dma request 109h (prohibit rmw) 1: dma request in software (3) transfer control registers the transfer source addre ss and the transfer destination address are set in the following registers. an instruction of the form ldc cr,r can be used to set these registers. 8 bits 16 bits 32 bits channel 0 dmas0 dmad0 dmac0 dmam0 channel 7 dmas7 dmad7 dmac7 dmam7 dma source address register 0: using only lower 24 bits. dma destination address register 0: using only lower 24 bits. dma counter register 0: 1 to 65536. dma mode register 0. dma source address register 7. dma destination address register 7. dma counter register 7. dma mode register 7.
tmp92c820 2007-02-16 92c820-42 (4) detailed description of the transfer mode register dmam [4:0] mode description execution time 000zz destination inc mode (dmadn + ) (dmasn) dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states 001zz destination dec mode (dmadn ? ) (dmasn) dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states 010zz source inc mode (dmadn) (dmasn + ) dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states 011zz source dec mode (dmadn) (dmasn ? ) dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states 100zz source and destination inc mode (dmadn + ) (dmasn + ) dmacn dmacn ? 1 if dmacn = 0 then inttcn 6 states 101zz source and destination dec mode (dmadn ? ) (dmasn ? ) dmacn dmacn ? 1 if dmacn = 0 then inttcn 6 states 110zz destination and fixed mode (dmadn) (dmasn) dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states 11100 counter mode dmasn dmasn + 1 dmacn dmacn ? 1 if dmacn = 0 then inttcn 5 states zz: 00 = 1-byte transfer 01 = 2-byte transfer 10 = 4-byte transfer 11 = reserved note 1: the execution time is measured at 1 states = 50 ns (operation at internal 20 mhz). note 2: n stands for the micro dma channel number (0 to 7). dmadn + /dmasn + : post increment (register value is incremented after transfer). dmadn ? /dmasn ? : post decrement (register value is decremented after transfer). ?i/o? signifies fixed memory addresses; ?memory? signifies incremented or decremented memory addresses. note2: the transfer mode register should not be set to any value other than those listed above. 0 0 0 mode dmam0 to dmam7
tmp92c820 2007-02-16 92c820-43 3.4.3 interrupt controller operation the block diagram in 5h figure 3.4.3 shows the interrupt circuits. the left-hand side of the diagram shows the interrupt controller ci rcuit. the right-hand side shows the cpu interrupt request signal circuit and the halt release circuit. for each of the 52 interrupt channels there is an interrupt request flag (consisting of a flip-flop), an interrupt priority setting register and a micro dma start vector register. the interrupt request flag latches interrupt requests from the peripherals. the flag is cleared to zero in the following cases: when a reset occu rs, when the cpu reads the channel vector of an interrupt it has received, when the cp u receives a micro dm a request (when micro dma is set), when a micro dma burst transfer is terminated, and when an instruction that clears the interrupt for that channel is execut ed (by writing a micro dma start vector to the intclr register). an interrupt priority can be set independentl y for each interrupt source by writing the priority to the interrupt priority setting regi ster (e.g., inte0ad or inte12). six interrupt priorities levels (1 to 6) are provided. setting an interrupt sour ce?s priority level to 0 (or 7) disables interrupt requests from that source. the priority of non-maskable interrupt (watchdo g timer interrupts) is fixed at 7. if more than one interrupt request with a given priority level are generated simultaneously, the default priority (the interrupt with the lowest priority or, in other words, the interrupt with the lowest vector value) is used to determine which interrupt request is accepted first. the 3rd and 7th bits of the interrupt priority setting register indicate the state of the interrupt request flag and thus whether an interrupt request for a given channel has occurred. if several interrupts are generated simultan eously, the interrupt controller sends the interrupt request for the interrupt with the highest priority and the interrupt?s vector address to the cpu. the cpu compares the mask value set in of the status register (sr) with the priority level of the requested interrupt; if the latter is higher, the interrupt is accepted. then the cpu sets sr to the priority level of the accepted interrupt + 1. hence, during processing of the accepted interrupt, new interrupt requests with a priority value equal to or higher than the value set in sr (e.g., interrupts with a priority higher than the interrupt being processed) will be accepted. when interrupt processing has been completed (e.g., after exec ution of a reti instruction), the cpu restores to sr the priority value which was saved on the stack before the interrupt was generated. the interrupt controller also includes eight registers which are used to store the micro dma start vector. writing the start vector of the interrupt source for the micro dma processing (see 6h table 3.4.1 and 7h table 3.4.), enables the corresponding interrupt to be processed by micro dma processing. the values must be set in the micro dma parameter registers (e.g., dmas and dmad) prior to micro dma processing.
tmp92c820 2007-02-16 92c820-44 figure 3.4.3 block diagram of interrupt controller interrupt request signal to cpu micro dma start vector setting registe r during idle1 during stop 36 3 3 3 1 6 2 2 4 6 34 4-input or int0, 1, 2, 3, int key, intrtc, intalm micro dma channel priority encoder priority encode r dma0v dma1v dma2v dma3v reset interrupt request f/f reset reset priority setting registe r v = 20h v = 24h interrupt controlle r cpu s q r v = 28h v = 2ch v = 30h v = 34h v = 3ch v = 40h v = 44h v = 48h v = 4ch v = 58h v = d0h v = d4h v = d8h v = dch v = e0h v = e4h v = e8h v = ech d q clr a b c dn dn + 1 dn + 2 interrupt request f/f interrupt vector read micro dma acknowled g e interrupt request f/f dn + 3 a b c interrupt vector read d2 d3 d4 d5 d6 d7 0 1 2 3 a b d0 d1 interrupt mask f/f micro dma request halt release if intrq2 to 0 iff 2 to 0 then 1. intrq2 to 0 iff2:0 reset ei1 to 7 di interrupt request signal micro dma channel specification reset (reserved) intwd int0 int1 int2 int3 intalm0 intalm1 intalm2 intalm3 intalm4 intta0 inttc0 inttc1 inttc2 inttc3 inttc4 inttc5 inttc6 inttc7 interrupt vector generator highest priority interrupt level select 1 2 3 4 5 6 7 d5 d4 d3 d2 d1 d0 decode r y1 y2 y3 y4 y5 y6 s q r 7 1 6 interrupt level detect d q clr s selector interrupt vector read inttc0 soft start if iff = 7 then 0 micro dma counter 0 interrupt
tmp92c820 2007-02-16 92c820-45 (1) interrupt priority setting registers symbol name address 7 6 5 4 3 2 1 0 intad int0 iadc iadm2 iadm1 iadm0 i0c i0m2 i0m1 i0m0 r r/w r r/w inte0ad int0& intad enable f0h 0 0 0 0 0 0 0 0 int2 int1 i2c i2m2 i2m1 i2m0 i1c i1m2 i1m1 i1m0 r r/w r r/w inte12 int1&int2 enable d0h 0 0 0 0 0 0 0 0 ? int3 ? ? ? ? i3c i3m2 i3m1 i3m0 ? ? r r/w inte3 int3 enable d1h always write ?0?. 0 0 0 0 intta1 (tmra1) intta0 (tmra0) ita1c ita1m2 ita1m1 ita1m0 it a0c ita0m2 ita0m1 ita0m0 r r/w r r/w inteta01 intta0& intta1 enable d4h 0 0 0 0 0 0 0 0 intat3 (tmra3) intat2 (tmra2) ita3c ita3m2 ita3m1 ita3m0 it a2c ita2m2 ita2m1 ita2m0 r r/w r r/w inteta23 intta2& intta3 enable d5h 0 0 0 0 0 0 0 0 inttb1 (tmrb1) inttb0 (tmrb0) itb1c itb1m2 itb1m1 itb1m0 it b0c itb0m2 itb0m1 itb0m0 r r/w r r/w intetb01 inttb0& inttb1 enable d8h 0 0 0 0 0 0 0 0 ? inttbo0 ? ? ? ? itbo0c itbo0m2 itbo0m1 itbo0m0 r r/w r r/w intetbo0 inttbo0 (overflow) enable dah 0 0 0 0 0 0 0 0 inttx0 intrx0 itx0c itx0m2 itx0m1 itx0m0 irx0c irx0m2 irx0m1 irx0m0 r r/w r r/w intes0 intrx0& inttx0 enable dbh 0 0 0 0 0 0 0 0 inttx1 intrx1 itx1c itx1m2 itx1m1 itx1m0 irx1c irx1m2 irx1m1 irx1m0 r r/w r r/w intes1 intrx1& inttx1 enable dch 0 0 0 0 0 0 0 0 ? intsbe0 ? ? ? ? isbe0c isbe0m2 isbe0m1 isbe0m0 ? ? r r/w intesb0 intsbe0 enable e3h always write ?0?. 0 0 0 0 intalm1 intalm0 ia1c ia1m2 ia1m1 ia1m0 ia0c ia0m2 ia0m1 ia0m0 r r/w r r/w intealm 01 intalm0& intalm1 enable e5h 0 0 0 0 0 0 0 0 intalm3 intalm2 ia3c ia3m2 ia3m1 ia3m0 ia2c ia2m2 ia2m1 ia2m0 r r/w r r/w intealm 23 intalm2& intalm3 enable e6h 0 0 0 0 0 0 0 0
tmp92c820 2007-02-16 92c820-46 symbol name address 7 6 5 4 3 2 1 0 ? intalm4 ? ? ? ? ia4c ia4m2 ia4m1 ia4m0 ? ? r r/w intealm4 intalm4 enable e7h always write ?0?. 0 0 0 0 ? intrtc ? ? ? ? irc irm2 irm1 irm0 ? ? r r/w intertc intrtc enable e8h always write ?0?. 0 0 0 0 ? intkey ? ? ? ? ikc ikm2 ikm1 ikm0 ? ? r r/w inteckey intkey enable e9h always write ?0?. 0 0 0 0 ? intlcd ? ? ? ? ilcd1c ilcdm2 ilcdm1 ilcdm0 ? ? r r/w intlcd intlcd enable eah always write ?0?. 0 0 0 0 inttx2 intrx2 itx2c itx2m2 itx2m1 itx2m0 irx2c irx2m2 irx2m1 irx2m0 r r/w r r/w intes2 intrx2& inttx2 enable edh 0 0 0 0 0 0 0 0 ? intp0 ? ? ? ? ip0c ip0m2 ip0m1 ip0m0 ? ? r r/w intep0 intp0 enable eeh always write ?0?. 0 0 0 0 ixxm2 ixxm1 ixxm0 function (write) 0 0 0 disables interrupt requests 0 0 1 sets interrupt priority level to 1 0 1 0 sets interrupt priority level to 2 0 1 1 sets interrupt priority level to 3 1 0 0 sets interrupt priority level to 4 1 0 1 sets interrupt priority level to 5 1 1 0 sets interrupt priority level to 6 1 1 1 disables interrupt requests interrupt request flag
tmp92c820 2007-02-16 92c820-47 symbol name address 7 6 5 4 3 2 1 0 inttc1 (dma1) inttc0 (dma0) itc1c itc1m2 itc1m1 itc1m0 itc0c itc0m2 itc0m1 itc0m0 r r/w r r/w intetc01 inttc0& inttc1 enable f1h 0 0 0 0 0 0 0 0 inttc3 (dma3) inttc2 (dma2) itc3c itc3m2 itc3m1 itc3m0 itc2c itc2m2 itc2m1 itc2m0 r r/w r r/w intetc23 inttc2& inttc3 enable f2h 0 0 0 0 0 0 0 0 inttc5 (dma5) inttc4 (dma4) itc5c itc5m2 itc5m1 itc5m0 itc4c itc4m2 itc4m1 itc4m0 r r/w r r/w intetc45 inttc4& inttc5 enable f3h 0 0 0 0 0 0 0 0 inttc7 (dma7) inttc6 (dma6) itc7c itc7m2 itc7m1 itc7m0 itc6c itc6m2 itc6m1 itc6m0 r r/w r r/w intetc67 inttc6& inttc7 enable f4h 0 0 0 0 0 0 0 0 ? intwd ? ? ? ? itcwd ? ? ? ? ? r ? intwdt intwd f7h always write ?0?. 0 ? ? ? ixxm2 ixxm1 ixxm0 function (write) 0 0 0 disables interrupt requests 0 0 1 sets interrupt priority level to 1 0 1 0 sets interrupt priority level to 2 0 1 1 sets interrupt priority level to 3 1 0 0 sets interrupt priority level to 4 1 0 1 sets interrupt priority level to 5 1 1 0 sets interrupt priority level to 6 1 1 1 disables interrupt requests interrupt request flag
tmp92c820 2007-02-16 92c820-48 (2) external interrupt control symbol name address 7 6 5 4 3 2 1 0 i3edge i2edge i1edge i0edge i0le ? w w w w r/w r/w 0 0 0 0 0 0 iimc interrupt input mode control f6h (prohibit rmw) int3edge 0: rising 1: falling int2edge 0: rising 1: falling int1edge 0: rising 1: falling int0edge 0: rising 1: falling int0 0: edge mode 1: level mode always write ?0?. * int0 level enable 0 edge detect int 1 ?h? level int note 1: disable int0 request before changing int0 pin mode from level sense to edge sense. setting example: di ld (iimc), xxxxxx0 - b ; switches from level to edge. ld (intclr), 0ah ; clears interrupt request flag. ei note 2: x: don?t care, ?: no change note 3: see electrical characteristics in sect ion 4 for external interrupt input pulse width. settings of external interrupt pin function interrupt pin name mode setting method rising edge iimc = 0, int0edge = 0 falling edge iimc = 0, int0edge = 1 int0 pc3 high level iimc = 1 rising edge int1edge = 0 int1 pc1 falling edge int1edge = 1 rising edge int2edge = 0 int2 pc5 falling edge int2edge = 1 rising edge int3edge = 0 int3 pc6 falling edge int3edge = 1
tmp92c820 2007-02-16 92c820-49 (3) sio receive interrupt control symbol name address 7 6 5 4 3 2 1 0 ir2le ir1le ir0le w w w 1 1 1 simc sio interrupt mode control f5h (prohibit rmw) 0: intrx2 edge mode 1: intrx2 level mode 0: intrx1 edge mode 1: intrx1 level mode 0: intrx0 edge mode 1: intrx0 level mode intrx0 rising edge enable 0 rising edge detect intrx0 1 ?h? level intrx0 intrx1 level enable 0 rising edge detect intrx1 1 ?h? level intrx1 intrx2 level enable 0 rising edge detect intrx2 1 ?h? level intrx2
tmp92c820 2007-02-16 92c820-50 (4) interrupt request flag clear register the interrupt request flag is cleared by writing the appropriate micro dma start vector, as given in 8h table 3.4.1 to the register intclr. for example, to clear the interrupt flag int0, perform the following register operation after execution of the di instruction. intclr 0ah ; clears interrupt request flag int0. symbol name address 7 6 5 4 3 2 1 0 clrv7 clrv6 clrv5 clrv4 clrv3 clrv2 clrv1 clrv0 w 0 0 0 0 0 0 0 0 intclr interrupt clear control f8h (prohibit rmw) interrupt vector (5) micro dma start vector registers these registers assign micro dma processing to an sets which source corresponds to dma. the interrupt source whose micro dma start vector value matches the vector set in one of these registers is designated as the micro dma start source. when the micro dma transfer counter value reaches zero, the micro dma transfer end interrupt corresponding to the channel is sent to the interrupt controller, the micro dma start vector register is cleared, and th e micro dma start source for the channel is cleared. therefore, in order for micro dma processing to continue, the micro dma start vector register must be set again during processing of the micro dma transfer end interrupt. if the same vector is set in the micro dma start vector registers of more than one channel, the lowest numbered channel takes priority. accordingly, if the same vector is set in the micro dma start vector registers for two different channels, the interrupt generated on the lower-numbered channel is executed until micro dma transfer is complete. if th e micro dma start vector for this channel has not been set in the channel?s micro dm a start vector register again, micro dma transfer for the higher-numbered channel will be commenced. (this process is known as micro dma chaining.)
tmp92c820 2007-02-16 92c820-51 symbol name address 7 6 5 4 3 2 1 0 dma0v5 dma0v4 dma0v3 dma0v2 dma0v1 dma0v0 r/w 0 0 0 0 0 0 dma0v dma0 start vector 100h dma0 start vector dma1v5 dma1v4 dma1v3 dma1v2 dma1v1 dma1v0 r/w 0 0 0 0 0 0 dma1v dma1 start vector 101h dma1 start vector dma2v5 dma2v4 dma2v3 dma2v2 dma2v1 dma2v0 r/w 0 0 0 0 0 0 dma2v dma2 start vector 102h dma2 start vector dma3v5 dma3v4 dma3v3 dma3v2 dma3v1 dma3v0 r/w 0 0 0 0 0 0 dma3v dma3 start vector 103h dma3 start vector dma4v5 dma4v4 dma4v3 dma4v2 dma4v1 dma4v0 r/w 0 0 0 0 0 0 dma4v dma4 start vector 104h dma4 start vector dma5v5 dma5v4 dma5v3 dma5v2 dma5v1 dma5v0 r/w 0 0 0 0 0 0 dma5v dma5 start vector 105h dma5 start vector dma6v5 dma6v4 dma6v3 dma6v2 dma6v1 dma6v0 r/w 0 0 0 0 0 0 dma6v dma6 start vector 106h dma6 start vector dma7v5 dma7v4 dma7v3 dma7v2 dma7v1 dma7v0 r/w 0 0 0 0 0 0 dma7v dma7 start vector 107h dma7 start vector
tmp92c820 2007-02-16 92c820-52 (6) specification of a micro dma burst specifying the micro dma burst function ca uses micro dma transfer, once started, to continue until the value in the transfer counter register reaches zero. setting any of the bits in the register dmab which co rrespond to a micro dma channel (as shown below) to 1 specifies that any micro dma transfer on that channel will be a burst transfer. symbol name address 7 6 5 4 3 2 1 0 dbst7 dbst6 dbst5 dbst4 d bst3 dbst2 dbst1 dbst0 r/w 0 0 0 0 0 0 0 0 dmab dma burst 108h 1: dma request on burst mode
tmp92c820 2007-02-16 92c820-53 (7) notes the instruction execution unit and the bus interface unit in this cpu operate independently. therefore, if immediately before an interrupt is generated, the cpu fetches an instruction which clears the co rresponding interrupt request flag, the cpu may execute this instruction in between accepting the interrupt and reading the interrupt vector. in this case , the cpu will read the defaul t vector 0004h and jump to interrupt vector address ffff04h. to avoid this, an instruction which clears an interrupt request flag should always be preceded by a di instruction. and in the case of setting an interrupt enable again by ei instruction after the execution of clearing instruction, execute ei instruction after clearing and more than 3-instructions (e.g., ?nop? 3 times). if placed ei instruction without waiting nop instruction after executio n of clearing instruction, interrupt will be enable before request flag is cleared. in the case of changing the value of the interrupt mask register by execution of pop sr instruction, disable an interrupt by di instruction before execution of pop sr instruction. in addition, please note that the following two circuits are exceptional and demand special attention. in level mode int0 is not an edge-triggered interrupt. hence, in level mode the interrupt request flip-flop for int0 does not function. the peripheral interrupt request passes through the s input of the flip-flop and becomes the q output. if the interrupt input mode is changed from edge mode to level mode, the interrupt request flag is cleared automatically. int0 level mode if the cpu enters the interrupt response sequence as a result of int0 going from 0 to 1, int0 must then be held at 1 until the interrupt response sequence has been completed. if int0 is set to level mode so as to release a halt state, int0 must be held at 1 from the time int0 changes from 0 to 1 until the halt state is released. (hence, it is necessary to ensure that input noise is not interpreted as a 0, causing int0 to revert to 0 before the halt state has been released.) when the mode changes from level mode to edge mode, interrupt request flags which were set in level mode will not be cleared. interrupt request flags must be cl eared using the following sequence. di ld (iimc), 00h ; switches from level to edge. ld (intclr), 0ah ; clears interrupt request flag. nop ; wait ei execution nop nop ei intrx in edge mode (the register simc set to ?0?), the interrupt request flip-flop can only be cleared by a reset or by reading the serial channel receive buffer. it cannot be cleared by writing intclr register. note: the following instructions or pin input stat e changes are equivalent to instructions which clear the interrupt request flag. int0: instructions which switch to leve l mode after an interrupt request has been generated in edge mode. the pin input changes from high to low after an interrupt request has been generated in level mode. (?h? ?l?) intrx: instructions which read the receive buffer.
tmp92c820 2007-02-16 92c820-54 3.5 function of ports tmp92c820 has i/o port pins that are shown in 0h table 3.5.1. in addition to functioning as general-purpose i/o ports, these pins are also used by internal cpu and i/o functions. 1h table 3.5.2 lists i/o registers and their specifications. table 3.5.1 port functions (1/2) (r: pu = with programmable pull-up resistor, u = with pull-up resistor) port name pin name number of pins i/o r i/o setting pin name for built-in function port 1 p10 to p17 8 i/o ? bit d8 to d15 port 2 p20 to p27 8 i/o ? bit d16 to d23 port 3 p30 to p37 8 i/o ? bit d24 to d31 port 4 p40 to p47 8 i/o* ? bit* a0 to a7 port 5 p50 to p57 8 i/o* ? bit* a8 to a15 port 6 p60 to p67 8 i/o* ? bit* a16 to a23 p70 1 output ? (fixed) rd p71 1 output ? (fixed) wrll p72 1 output ? (fixed) wrlu p73 1 output ? (fixed) wrul p74 1 output ? (fixed) wruu p75 1 output ? (fixed) r/ w port 7 p76 1 i/o ? bit wait p80 1 output ? (fixed) cs0 , sdcsh p81 1 output ? (fixed) cs1 , sdcsl p82 1 output ? (fixed) cs2 , cs2a p83 1 output ? (fixed) cs3 p84 1 output ? (fixed) ea24, cs2b p85 1 output ? (fixed) ea25, cs2c p86 1 output ? (fixed) cs2d port 8 p87 1 output ? (fixed) sdclk p90 1 i/o ? bit sck p91 1 i/o ? bit so, sda p92 1 i/o ? bit si, scl p93 1 i/o ? bit cs2e p94 1 i/o ? bit cs2f p95 1 i/o ? bit cs2g , txd2 port 9 p96 1 i/o ? bit csexa , rxd2 port a pa0 to pa7 8 input u (fixed) ki0 to ki7 pc0 1 i/o ? bit ta0in pc1 1 i/o ? bit int1, ta1out pc3 1 i/o ? bit int0 pc5 1 i/o ? bit int2, ta3out port c pc6 1 i/o ? bit int3, tb0out0 pf0 1 i/o ? bit txd0 pf1 1 i/o ? bit rxd0 pf2 1 i/o ? bit sclk0, 0 cts pf3 1 i/o ? bit txd1 pf4 1 i/o ? bit rxd1 port f pf5 1 i/o ? bit sclk1, 1 cts *: when these ports are used as general-purpose i/o por t, each bit can be set individually for input or output. however, each bit cannot be set individually for input or output even if 1bit or more bits are used as address bus in same port. all of general-purpose i/o ports except for port that used as address bus are operated as output port. please be careful when using this setting.
tmp92c820 2007-02-16 92c820-55 table 3.5.1 port functions (2/2) (r: pu = with programmable pull-up resistor, u = with pull-up resistor) port name pin name number of pins i/o r i/o setting pin name for built-in function port g pg0 to pg4 5 input ? (fixed) an0 to an4, adtrg (pg3) pj0 1 output ? (fixed) sdras pj1 1 output ? (fixed) sdcas pj2 1 output ? (fixed) sdwe , srwr pj3 1 output ? (fixed) sdlldqm , srllb pj4 1 output ? (fixed) sdludqm , srlub pj5 1 output ? (fixed) sduldqm , srulb pj6 1 output ? (fixed) sduudqm , sruub port j pj7 1 output ? (fixed) sdcke pk0 1 output ? (fixed) d1bscp pk1 1 output ? (fixed) d2blp pk2 1 output ? (fixed) d3bfr pk3 1 output ? (fixed) dlebcd pk4 1 output ? (fixed) doffb port k pk6 1 output ? (fixed) alarm , mldalm port l pl0 to pl7 8 i/o ? bit ld0 to ld7
tmp92c820 2007-02-16 92c820-56 table 3.5.2 i/o registers and specifications (1/3) i/o register port pin name specification pn pncr pnfc pnfc2 pnode input port x 0 output port x 1 0 port 1 p10 to p17 d8 to d15 bus x x 1 none none input port x 0 output port x 1 0 port 2 p20 to p27 d16 to d23 bus x x 1 none none input port x 0 output port x 1 0 port 3 p30 to p37 d24 to d31 bus x x 1 none none input port* x 0* output port* x 1* 0 port 4 p40 to p47 a0 to a7 output x 0 1 none none input port* x 0* output port* x 1* 0 port 5 p50 to p57 a8 to a15 output x 0 1 none none input port* x 0* output port* x 1* 0 port 6 p60 to p67 a16 to a23 output x 0 1 none none p70 to p75 output port x none 0 p70 rd output p71 wrll output p72 wrlu output p73 wrul output p74 wruu output p75 r/ w output x none 1 input port x 0 0 output port x 1 0 port 7 p76 wait input x 0 1 none none p80 to p87 output port x 0 0 p80 cs0 output x 1 0 cs1 output x 1 0 p81 sdcs output x x 1 cs2 output x 1 0 p82 cs2a output x x 1 p83 cs3 output x 1 0 ea24 output x 1 0 p84 cs2b output x x 1 ea25 output x 1 0 p85 cs2c output x x 1 p86 cs2d output x x 1 port 8 p87 sdclk output x none 1 0 none x: don?t care *: when these ports are used as general-purpose i/o por t, each bit can be set individually for input or output. however, each bit cannot be set individually for input or output even if 1bit or more bits are used as address bus in same port. all of general-purpose i/o ports except for port that used as address bus are operated as output port. please be careful when using this setting.
tmp92c820 2007-02-16 92c820-57 table 3.5.2 i/o registers and specifications (2/3) i/o register port pin name specification pn pncr pnfc pnfc2 pnode input port x 0 0 0 p90 to p96 output port x 1 0 0 sck input x 0 0 0 p90 sck output x x 1 0/1 so output x 1 1 0/1 p91 sda x x 1 1 si input x 0 0 0 p92 scl x x 1 1 cs2e output x 1 1 x sscmd input x 0 1 x sscmd output x 0 1 0 p93 sscmd (open drain) x 0 1 1 cs2f output x 1 1 x ssdat input x 0 1 x ssdat output x 0 1 0 p94 ssdat (open drain) x 0 1 1 cs2g output x 1 1 x txd2 output x 0 1 0 p95 txd2 (open drain) x 0 1 1 csexa output x 1 1 x port 9 p96 rxd2 input x 0 1 none x input port x 0 port a pa0 to pa7 ki0 to ki7 input x none 1 none none input port x 0 0 pc0, pc1, pc3 pc5, pc6 output port x 1 0 pc0 ta0in input x x 1 ta1out output x 1 1 pc1 int1 input 0 0 1 pc3 int0 input x 0 1 int2 input 0 0 1 pc5 ta3out 1 1 1 int3 input 0 0 1 port c pc6 tb0out0 1 1 1 none none input port x 0 0 pf0 to pf5 output port x 1 0 txd0 1 0 1 pf0 txd0 (open drain) 1 1 1 pf1 rxd0 input x 0 none sclk0 input/output 1 0/1 1 pf2 0 cts input 1 0 1 txd1 1 0 1 pf3 txd1 (open drain) 1 1 1 pf4 rxd1 input x 0 none sclk1 input/output 1 0/1 1 port f pf5 1 cts input 1 0 1 none none input port x pg0 to pg4 an0 to an4 input x port g pg3 adtrg input x none none none none x: don?t care
tmp92c820 2007-02-16 92c820-58 table 3.5.2 i/o registers and specifications (3/3) i/o register port pin name specification pn pncr pnfc pnfc2 pnode pj0 to pj7 output port x 0 0 pj0 sdras output x 1 0 pj1 sdcas output x 1 0 sdwe output x 1 0 pj2 srwr output x x 1 sdlldqm output x 1 0 pj3 srllb output x x 1 sdludqm output x 1 0 pj4 srlub output x x 1 sduldqm output x 1 0 pj5 srulb output x x 1 sduudqm output x 1 0 pj6 sruub output x x 1 port j pj7 sdcke output x none 1 0 none pk0 to pk6 output port x 0 pk0 d1bscp output x 1 pk1 d2blp output x 1 pk2 d3bfr output x 1 pk3 dlebcd output x 1 pk4 doffb output x 1 alarm output 1 1 port k pk6 mldalm output 0 none 1 none none input port x 0 0 output port x 1 0 port l pl0 to pl7 ld0 to ld7 output x x 1 none none x: don?t care after a reset the port pins listed below function as general-purpose i/o port pins. a reset sets i/o pins, which can be programmed for either input, or output to be input ports pins. setting the port pins for internal function use must be done in software.
tmp92c820 2007-02-16 92c820-59 3.5.1 port 1 (p10 to p17) port 1 is an 8-bit general-purpose i/o port. bits can be individually set as either inputs or outputs by control register p1cr and function register p1fc. in addition to functioning as a general-purpose i/o port, port 1 can also function as a data bus (d8 to d15). am1 am0 function setting after reset is released 0 0 1 1 0 1 0 1 don?t use this setting data bus (d8 to d15) data bus (d8 to d15) don?t use this setting figure 3.5.1 port 1 external access (data write) internal data bus reset p1cr write output latch p1 write s a selector b p1 read port 1 p10 to p17 (d8 to d15) function control (on bit basis) p1fc write d8 to d15 external access (data read) output buffer direction control (on bit basis)
tmp92c820 2007-02-16 92c820-60 port 1 register 7 6 5 4 3 2 1 0 bit symbol p17 p16 p15 p14 p13 p12 p11 p10 read/write r/w after reset data from external port (output latch register is cleared to 0) port 1 control register 7 6 5 4 3 2 1 0 bit symbol p17c p16c p15c p14c p13c p12c p11c p10c read/write w after reset 0 0 0 0 0 0 0 0 function refer to port 1 function setting port 1 function register 7 6 5 4 3 2 1 0 bit symbol p1f read/write w after reset 1 function refer to port 1 function setting port 1 function register note 1:read-modify-write is prohibited for the registers p1cr and p1fc. note 2: show x bit of p1cr register. figure 3.5.2 register for port 1 p1fc p1cr 0 1 0 input port 1 output port data bus (d15 to d8) p1 (0004h) p1cr (0006h) p1fc (0007h)
tmp92c820 2007-02-16 92c820-61 3.5.2 port 2 (p20 to p27) port 2 is an 8-bit general-purpose i/o port. bits can be individually set as either inputs or outputs by control register p2cr and function register p2fc. in addition to functioning as a general-purpose i/o port, port 2 can also function as a data bus (d16 to d23). am1 am0 function setting after reset is released 0 0 1 1 0 1 0 1 don?t use this setting input port data bus (d16 to d23) don?t use this setting figure 3.5.3 port 2 external access (data write) internal data bus reset p2cr write output latch p2 write s a selector b p2 read port 2 p20 to p27 (d16 to d23) function control (on bit basis) p2fc write d16 to d23 external access (data read) output buffer direction control (on bit basis)
tmp92c820 2007-02-16 92c820-62 port 2 register 7 6 5 4 3 2 1 0 bit symbol p27 p26 p25 p24 p23 p22 p21 p20 read/write r/w after reset data from external port (output latch register is cleared to 0) port 2 control register 7 6 5 4 3 2 1 0 bit symbol p27c p26c p25c p24c p23c p22c p21c p20c read/write w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port 2 function register 7 6 5 4 3 2 1 0 bit symbol p2f read/write w after reset 0/1 note2 function 0: port 1: data bus (d16 to d23) port 2 function register note 1:read-modify-write is prohibited for the registers p2cr and p2fc. note 2: it is set to ?port? or ?data bus? by am pin setting. note 3: show x bit of p2cr register. figure 3.5.4 register for port 2 p2 (0008h) p2fc (000bh) p2fc p2cr 0 1 0 input port 1 output port data bus (d16 to d23) p2cr (000ah)
tmp92c820 2007-02-16 92c820-63 3.5.3 port 3 (p30 to p37) port 3 is an 8-bit general-purpose i/o port. bits can be individually set as either inputs or outputs by control register p3cr and function register p3fc. in addition to functioning as a general-purpose i/o port, port 3 can also function as a data bus (d24 to d31). am1 am0 function setting after reset is released 0 0 1 1 0 1 0 1 don?t use this setting input port data bus (d24 to d31) don?t use this setting figure 3.5.5 port 3 external access (data write) internal data bus reset p3cr write output latch p3 write s a selector b p3 read port 3 p30 to p37 (d24 to d31) function control (on bit basis) p3fc write d24 to d31 external access (data read) output buffer direction control (on bit basis)
tmp92c820 2007-02-16 92c820-64 port 3 register 7 6 5 4 3 2 1 0 bit symbol p37 p36 p35 p34 p33 p32 p31 p30 read/write r/w after reset data from external port (output latch register is cleared to 0) port 3 control register 7 6 5 4 3 2 1 0 bit symbol p37c p36c p35c p34c p33c p32c p31c p30c read/write w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port 3 function register 7 6 5 4 3 2 1 0 bit symbol p3f read/write w after reset 0/1 note2 function 0: port 1: data bus (d24 to d31) port 3 function register note 1:read-modify-write is prohibited for the registers p3cr and p3fc. note 2: it is set to ?port? or ?data bus? by am pin setting. note 3: show x bit of p3cr register. figure 3.5.6 register for port 3 p3 (000ch) p3cr (000eh) p3fc (000fh) p3fc p3cr 0 1 0 input port 1 output port data bus (d24 to d31)
tmp92c820 2007-02-16 92c820-65 3.5.4 port 4 (p40 to p47) port 4 is an 8-bit general-purpose i/o ports*. bits can be individually set as either inputs or outputs by control register p4cr and function register p4fc*. in addition to functioning as a general-purpose i/o port, port 4 can also function as an address bus (a0 to a7). am1 am0 function setting after reset is released 0 0 1 1 0 1 0 1 don?t use this setting address bus (a0 to a7) address bus (a0 to a7) don?t use this setting *: when these ports are used as general-purpose i/o port, each bit can be set individually for input or output. however, each bit cannot be set individually for input or output even if 1bit or more bits are used as address bus in same port. all of general-purpose i/o ports except for port that used as address bus are operated as output port. please be careful when using this setting. figure 3.5.7 port 4 internal data bus direction control (on bit basis)* reset p4cr write output latch p4 write s b selector a p4 read port 4 p40 to p47 (a0 to a7) function control (on bit basis) p4fc write output buffer internal address bus a 0 to a7
tmp92c820 2007-02-16 92c820-66 port 4 register 7 6 5 4 3 2 1 0 bit symbol p47 p46 p45 p44 p43 p42 p41 p40 read/write r/w after reset data from external port (output latch register is cleared to 0) port 4 control register 7 6 5 4 3 2 1 0 bit symbol p47c p46c p45c p44c p43c p42c p41c p40c read/write w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output (note2) port 4 function register 7 6 5 4 3 2 1 0 bit symbol p47f p46f p45f p44f p43f p42f p41f p40f read/write w after reset 1 1 1 1 1 1 1 1 function 0: port 1: address bus (a0 to a7) (note2) note1: read-modify-write is prohibited for the registers p4cr and p4fc. note2: when these ports are used as general-purpose i/o port, each bit can be set individually for input or output. however, each bit cannot be set individually for input or output even if 1bit or more bits are used as address bus in same port. all of general-purpose i/o ports except for port that used as address bus are operated as output port. please be careful when using this setting. figure 3.5.8 port 4 registers p4 (0010h) p4cr (0012h) p4fc (0013h)
tmp92c820 2007-02-16 92c820-67 3.5.5 port 5 (p50 to p57) port 5 is an 8-bit general-purpose i/o ports*. bits can be individually set as either inputs or outputs by control register p5cr and function register p5fc*. in addition to functioning as a general-purpose i/o port, port 5 can also function as an address bus (a8 to a15). am1 am0 function setting after reset is released 0 0 1 1 0 1 0 1 don?t use this setting address bus (a8 to a15) address bus (a8 to a15) don?t use this setting *: when these ports are used as general-purpose i/o port, each bit can be set individually for input or output. however, each bit cannot be set individually for input or output even if 1bit or more bits are used as address bus in same port. all of general-purpose i/o ports except for port that used as address bus are operated as output port. please be careful when using this setting. figure 3.5.9 port 5 internal data bus direction control (on bit basis)* reset p5cr write output latch p5 write s b selector a p5 read port 5 p50 to p57 (a8 to a15) function control (on bit basis) p5fc write output buffer internal address bus a 8 to a15
tmp92c820 2007-02-16 92c820-68 port 5 register 7 6 5 4 3 2 1 0 bit symbol p57 p56 p55 p54 p53 p52 p51 p50 read/write r/w after reset data from external port (output latch register is cleared to 0) port 5 control register 7 6 5 4 3 2 1 0 bit symbol p57c p56c p55c p54c p53c p52c p51c p50c read/write w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output (note2) port 5 function register 7 6 5 4 3 2 1 0 bit symbol p57f p56f p55f p54f p53f p52f p51f p50f read/write w after reset 1 1 1 1 1 1 1 1 function 0: port 1: address bus (a8 to a15) (note2) note1: read-modify-write is prohibited for the registers p5cr and p5fc. note2: when these ports are used as general-purpose i/o port, each bit can be set individually for input or output. however, each bit cannot be set individually for input or output even if 1bit or more bits are used as address bus in same port. all of general-purpose i/o ports except for port that used as address bus are operated as output port. please be careful when using this setting. figure 3.5.10 register for port 5 p5 (0014h) p5cr (0016h) p5fc (0017h)
tmp92c820 2007-02-16 92c820-69 3.5.6 port 6 (p60 to p67) port 6 is an 8-bit general-purpose i/o ports*. bits can be individually set as either inputs or outputs by control register p6cr and function register p6fc*. in addition to functioning as a general-purpose i/o port, port 6 can also function as an address bus (a16 to a23). am1 am0 function setting after reset is released 0 0 1 1 0 1 0 1 don?t use this setting address bus (a16 to a23) address bus (a16 to a23) don?t use this setting *: when these ports are used as general-purpose i/o port, each bit can be set individually for input or output. however, each bit cannot be set individually for input or output even if 1bit or more bits are used as address bus in same port. all of general-purpose i/o ports except for port that used as address bus are operated as output port. please be careful when using this setting. figure 3.5.11 port 6 internal data bus direction control (on bit basis)* reset p6cr write output latch p6 write s b selector a p6 read port 6 p60 to p67 (a16 to a23) function control (on bit basis) p6fc write output buffer internal address bus a 16 to a23
tmp92c820 2007-02-16 92c820-70 port 6 register 7 6 5 4 3 2 1 0 bit symbol p67 p66 p65 p64 p63 p62 p61 p60 read/write r/w after reset data from external port (output latch register is cleared to 0) port 6 control register 7 6 5 4 3 2 1 0 bit symbol p67c p66c p65c p64c p63c p62c p61c p60c read/write w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output (note2) port 6 function register 7 6 5 4 3 2 1 0 bit symbol p67f p66f p65f p64f p63f p62f p61f p60f read/write w after reset 1 1 1 1 1 1 1 1 function 0: port 1: address bus (a16 to a23) (note2) note1: read-modify-write is prohibited for the registers p6cr and p6fc. note2: when these ports are used as general-purpose i/o port, each bit can be set individually for input or output. however, each bit cannot be set individually for input or output even if 1bit or more bits are used as address bus in same port. all of general-purpose i/o ports except for port that used as address bus are operated as output port. please be careful when using this setting. figure 3.5.12 port 6 registers p6 (0018h) p6cr (001ah) p6fc (001bh)
tmp92c820 2007-02-16 92c820-71 3.5.7 port 7 (p70 to p76) port 7 is a 7-bit general-purpose i/o port (p70 to p75 are used for output only). bits can be individually set as either inputs or outputs by control register p7cr and function register p7fc. in addition to functioning as a general-purpose i/o port, p70 to p75 pins can also function as read/write strobe signals to connect with an external memory. p76 pin can also function as wait input. a reset initializes p70 to p75 pins to output port mode, and p76 pin to input port mode. am1 am0 function setting after reset is released 0 0 1 1 0 1 0 1 don?t use this setting rd pin rd pin don?t use this setting figure 3.5.13 port 7 (p70) internal data bus reset output latch p7 write s a selector b p7 read p70 ( rd ) function control (on bit basis) p7fc write output buffer rd
tmp92c820 2007-02-16 92c820-72 figure 3.5.14 port 7 (p71 to p74) figure 3.5.15 port 7 (p75) internal data bus reset output latch p7 write s a selector b p7 read p75 (r/ w ) function control (on bit basis) p7fc write output buffer r/ w internal data bus reset output latch p7 write s a selector b p7 read p71 ( wrll ) p72 ( wrlu ) p73 ( wrul ) p74 ( wruu ) function control (on bit basis) p7fc write output buffer wrll , wrlu , wrul , wruu
tmp92c820 2007-02-16 92c820-73 figure 3.5.16 port 7 (p76) internal data bus function control (on bit basis) reset p7cr write p7 read p76 ( wait ) p7 write output buffer s output latch internal wait signal direction control (on bit basis) p7fc write
tmp92c820 2007-02-16 92c820-74 port 7 register 7 6 5 4 3 2 1 0 bit symbol p76 p75 p74 p73 p72 p71 p70 read/write r/w after reset data from external port (note) 1 1 1 1 1 1 note: output latch register is cleared to 0. port 7 control register 7 6 5 4 3 2 1 0 bit symbol p76c read/write w after reset 0 function 0: input 1: output port 7 function register 7 6 5 4 3 2 1 0 bit symbol p76f p75f p74f p73f p72f p71f p70f read/write w after reset 0 0 0 0 0 0 1 function 0: port 1: wait 0: port 1: r/ w 0: port 1: wruu 0: port 1: wrul 0: port 1: wrlu 0: port 1: wrll 0: port 1: rd note: read-modify-write is prohibited for the registers p7cr and p7fc. figure 3.5.17 register for port 7 p7 (001ch) p7cr (001eh) p7fc (001fh)
tmp92c820 2007-02-16 92c820-75 3.5.8 port 8 (p80 to p87) ports 80 to 87 are 8-bit output ports. resetting sets output latch of p82 to ?0? and output latches of p80 to p81, p83 to p87 to ?1?. port 8 also function as chip-select output ( cs0 to cs3 ), extend address output (ea24, ea25), extend chip-select output ( cs2a , cs2b , cs2c , cs2d ), port 8 also function as output pin for sdram controller ( sdcsl , sdcsh , sdclk), above setting is used the function register p8fc. writing ?1? in the corresponding bit of p8 fc, p8fc2 enables the respective functions. resetting resets p87f of p8fc to ?1?, p80f to p86f of p8fc to ?0?, and p8fc2 to ?0?, sets all bits to output ports. figure 3.5.18 port 8 internal data bus function control 2 (on bit basis) reset p8fc2 write output lacth p8 write s a selector b c p8 read p80 ( cs0 , sdcsh ) p81 ( cs1 , sdcsl ) p82 ( cs2 , cs2a ) p83 ( cs3 ) p84 (ea24, cs2b ) p85 (ea25, cs2c ) p86 ( cs2d ) p87 (sdclk) function control (on bit basis) p8fc write sdcsh , sdcsl , cs2a , ?1?, cs2b , cs2c , cs2d , ?1? cs0 , cs1 , cs2 , cs3 , ea24, ea25, ?1?, sdclk
tmp92c820 2007-02-16 92c820-76 port 8 register 7 6 5 4 3 2 1 0 bit symbol p87 p86 p85 p84 p83 p82 p81 p80 read/write r/w after reset 1 1 1 1 1 0 1 1 port 8 function register 7 6 5 4 3 2 1 0 bit symbol p87f ? p85f p84f p83f p82f p81f p80f read/write w after reset 1 0 0 0 0 0 0 0 function 0: port 1: sdclk always write ?0?. 0: port 1: ea25 0: port 1: ea24 0: port 1: cs3 0: port 1: cs2 0: port 1: cs1 0: port 1: cs0 port 8 function register 2 7 6 5 4 3 2 1 0 bit symbol ? p86f2 p85f2 p84f2 ? p82f2 p81f2 p80f2 read/write w after reset 0 0 0 0 0 0 0 0 function always write ?0?. 0: 1: cs2d 0: 1: cs2c 0: 1: cs2b always write ?0?. 0: 1: cs2a 0: 1: sdcsl 0: 1: sdcsh note :read-modify-write is prohibited for p8fc and p8fc2 . figure 3.5.19 registers for port 8 p8 (0020h) p8fc (0023h) p8fc2 (0021h)
tmp92c820 2007-02-16 92c820-77 3.5.9 port 9 (p90 to p96) p90 to p96 are 7-bit general-purpose i/o port. i/o can be set on bit basis using the control register. resetting sets port 9 to input port and all bits of output latch to ?1?. writing in the corresponding bit of p9fc enables the respective functions. resetting resets the p9fc to ?0?, and sets all bits to input ports. (1) port 90 (sck), port 91 (so/sda), and port 92 (si/scl) ports 90 to 92 are general-purpose i/o port. it is also used as sck (clock signal for sio mode), so (data output for sio mode), sda (data input for i 2 c mode), si (data input for sio mode), and scl (clock input/output for i 2 c mode) for serial bus interface. figure 3.5.20 port 9 (p90 to p92) internal data bus direction control (on bit basis) reset p9cr write p9 write p9 read p90 (sck) p91 (so/sda) p92 (si/scl) function control (on bit basis) p9fc write sck output so output sda output scl output s output latch s b selector a s a selector b sck input sda input si/scl input open-drain possible p9ode
tmp92c820 2007-02-16 92c820-78 (2) ports 93 ( cs2e ), 94 ( cs2f ), 95 (txd2, cs2g ), and 96 (rxd2, csexa ) ports 93 to 96 are general-purpose i/o ports. figure 3.5.21 port 9 (p93 to p95) figure 3.5.22 port 9 (p96) internal data bus direction control (on bit basis) reset p9cr write p9 write p9 read p96 (rxd2, csexa ) function control (on bit basis) p9fc write csexa s output latch s b selector a s a selector b rxd2 internal data bus direction control (on bit basis) reset p9cr write p9 write p9 read p93 ( cs2e ) p94 ( cs2f ) p95 (txd2, cs2g ) function control (on bit basis) p9fc write txd2 s output latch s b selector a s a selector b c open-drain possible p9ode cs2e , cs2f , cs2g (except p95)
tmp92c820 2007-02-16 92c820-79 port 9 register 7 6 5 4 3 2 1 0 bit symbol p96 p95 p94 p93 p92 p91 p90 read/write r/w after reset data from external port (output latch register is set to 1) port 9 control register 7 6 5 4 3 2 1 0 bit symbol p96c p95c p94c p93c p92c p91c p90c read/write w after reset 0 0 0 0 0 0 0 function 0: input 1: output port 9 function register 7 6 5 4 3 2 1 0 bit symbol p96f p95f p94f p93f p92f p91f p90f read/write w after reset 0 0 0 0 0 0 0 function 0: port 1: rxd2, csexa 0: port 1: txd2, cs2g 0: port 1: cs2f 0: port 1: cs2e 0: port, si, 1: scl note 2 0: port 1: so, sda 0: port, sck input 1: sck output note 2 cs2e setting 0 1 0 input port output port 1 (reserved) cs2e cs2f setting 0 1 0 input port output port 1 (reserved) cs2f txd2, cs2g setting 0 1 0 input port output port 1 txd2 cs2g port 9 ode register 7 6 5 4 3 2 1 0 bit symbol p95ode ? ? p92ode p91ode read/write w w w w w after reset 0 0 0 0 0 function 0: 3 states 1: open drain always write ?0?. always write ?0?. 0: 3 states 1: open drain 0: 3 states 1: open drain note 1: read-modify-write is prohibited for p9cr, p9fc, and p9ode. note 2: when using si and sck input function, set p9fc to ?0? (function setting). figure 3.5.23 register for port 9 p9 (0024h) p9cr (0026h) p9fc (0027h) p9ode (0025h)
tmp92c820 2007-02-16 92c820-80 3.5.10 port a (pa0 to pa7) ports a0 to a7 are 8-bit input ports with pull-up resistor. in addition to functioning as general-purpose i/o ports, ports a0 to a7 ca n also key-on wakeup function as keyboard interface. the various functions can each be enabled by writing a ?1? to the corresponding bit of the port a function register (pafc). resetting resets all bits of the register pafc to ?0? and sets all pins to be input port. figure 3.5.24 port a when pafc = ?1?, if either of input of ki0 to ki 7 pins falls down, intkey interrupt is generated. intkey interrupt can be used release all halt mode. internal data bus pa0 to pa7 (ki0 to ki7) intkey start edge detection key-on enable (on bit basis) pafc write pa read pull-up resistor reset pa0 to pa7 8-input or
tmp92c820 2007-02-16 92c820-81 port a register 7 6 5 4 3 2 1 0 bit symbol pa7 pa6 pa5 pa4 pa3 pa2 pa1 pa0 read/write r after reset data from external port port a function register 7 6 5 4 3 2 1 0 bit symbol pa7f pa6f pa5f pa4f pa3f pa2f pa1f pa0f read/write w after reset 0 0 0 0 0 0 0 0 function 0: key-in disable 1: key-in enable key-in of port a 0 disable 1 enable note: read-modify-write is prohibited for the registers pafc. figure 3.5.25 register for port a pa (0028h) pafc (002bh)
tmp92c820 2007-02-16 92c820-82 3.5.11 port c (pc0, pc1, pc3, pc5 and pc6) port c is 5-bit general-purpose i/o port. each bit can be set individually for input or output. resetting sets port c to be an input port. in addition to functioning as a general-purpose i/o port, port c can also functions as i/o pin for timers (ta0in, ta1out, ta3out, tb0o ut0), input pin for external interruption (int0 to int3). above setting is used the function register pcfc and pccr register. edge select of external interruption establishes it with iimc register, which there is in interruption controller. resetting resets bits of the register pccr and pcfc to ?0? and sets all pins to be input port. (1) pc0 (ta0in) in addition to function as i/o port, port 0 can also function as input pin ta0in of timer channel 0. figure 3.5.26 port c (pc0) note: cannot read the output latch data when output mode. internal data bus direction control (on bit basis) reset pccr write pc read pc0 (ta0in) pc write s output latch s b selector a function control (on bit basis) pcfc write ta0in
tmp92c820 2007-02-16 92c820-83 (2) pc1 (int1, ta1out), pc5 (int2, ta3out) and pc6 (int3, tb0out0) figure 3.5.27 port c (pc1, pc5, pc6) note: cannot read the output latch data when output mode. internal data bus direction control (on bit basis) reset pccr write pc write pc read pc1 (int1, ta1out) pc5 (int2, ta3out) pc6 (int3, tb0out0) function control (on bit basis) pcfc write s output latch rising/falling edge detection iimc a s selector b int1 int2 int3 s b selector a ta1out ta3out tb0out0
tmp92c820 2007-02-16 92c820-84 (3) pc3 (int0) figure 3.5.28 port c (pc3) internal data bus direction control (on bit basis) reset pccr write pc write pc read pc3 (int0) function control (on bit basis) pcfc write s output latch s b selector a level/edge select and rising/falling select iimc int0
tmp92c820 2007-02-16 92c820-85 port c register 7 6 5 4 3 2 1 0 bit symbol pc6 pc5 pc3 pc1 pc0 read/write r/w r/w r/w after reset data from external port (output latch register is set to 1) data from external port (output latch register is set to 1) data from external port (output latch register is set to 1) port c control register 7 6 5 4 3 2 1 0 bit symbol pc6c pc5c pc3c pc1c pc0c read/write w w w after reset 0 0 0 0 0 function 0: input 1: output 0: input 1: output 0: input 1: output port c function register 7 6 5 4 3 2 1 0 bit symbol pc6f pc5f pc3f pc1f pc0f read/write w w w after reset 0 0 1 0 0 function 0: port 1: int3 tb0out0 0: port 1: int2 ta3out 0: port 1: int0 0: port 1: int1 ta1out 0: port 1: ta0in int1, ta1out setting 0 1 0 input port output port 1 int1 ta1out int2, ta3out setting 0 1 0 input port output port 1 int2 ta3out int3, tb0out0 setting 0 1 0 input port output port 1 int3 tb0out0 note 1: read-modify-write is prohibited for the registers pccr and pcfc. note 2: pc0/ta0in pin does not have a register changing port/function. for example, when it is used as an input port, the input signal is inputted to 8-bit timer. note 3: cannot read the output latch data when pc0, pc1, pc5, and pc6 are output mode. figure 3.5.29 register for port c pc (0030h) pccr (0032h) pcfc (0033h)
tmp92c820 2007-02-16 92c820-86 3.5.12 port f (pf0 to pf5) ports f0 to f5 are 6-bit general-purpose i/o ports. each bit can be set individually for input or output. resetting sets pf0 to pf5 to be an input ports. it also sets all bits of the output latch register to ?1?. in addition to functioning as general-purpose i/o port pins, pf0 to pf5 can also function as the i/o for serial channels 0 and 1. a pin can be enabled for i/o by writing a ?1? to the corresponding bit of the port f function register (pffc). by resetting, clears all bits of the register s pfcr and pffc to 0 and sets all pins to be input ports. (1) ports pf0 (txd0) and pf3 (txd1) as well as functioning as i/o port pins, port pf0 and pf3 can also function as serial channel txd output pins. figure 3.5.30 port f (pf0 and pf3) internal data bus direction control (on bit basis) reset pfcr write pf write pf read pf0 (txd0) pf3 ( txd1 ) function control (on bit basis) pffc write s output latch s b selector a s a selector b txd0, txd1 open-drain set possible
tmp92c820 2007-02-16 92c820-87 (2) ports pf1 and pf4 (rxd0, rxd1) ports pf1 and pf4 are i/o port pins and can also is used as rxd input for the serial channels. figure 3.5.31 port f (pf1 and pf4) internal data bus direction control (on bit basis) reset pfcr write pf write pf read pf1 (rxd0) pf4 (rxd1) s output latch s b selector a rxd0, rxd1
tmp92c820 2007-02-16 92c820-88 (3) ports pf2 ( cts0 , sclk0) and pf5 ( cts1 , sclk1) ports pf2 and pf5 are i/o port pins and can also be used as cts input or sclk input/output for the serial channels. figure 3.5.32 port f (pf2 and pf5) internal data bus direction control (on bit basis) reset pfcr write pf write pf read pf2 (sclk0, cts0 ) pf5 (sclk1, cts1 ) function control (on bit basis) pffc write s output latch s b selector a s a selector b sclk0, sclk1 output cts0 , cts1 sclk0, sclk1 input
tmp92c820 2007-02-16 92c820-89 port f register 7 6 5 4 3 2 1 0 bit symbol pf5 pf4 pf3 pf2 pf1 pf0 read/write r/w after reset data from external port (output latch register is set to 1) port f control register 7 6 5 4 3 2 1 0 bit symbol pf5c pf4c pf3c pf2c pf1c pf0c read/write w after reset 0 0 0 0 0 0 function 0: input 1: output port f function register 7 6 5 4 3 2 1 0 bit symbol pf5f pf3f pf2f pf0f read/write w w w after reset 0 0 0 0 function 0: port 1: sclk1 output 0: port 1: txd1 0: port 1: sclk0 output 0: port 1: txd0 3 states, open-drain setting 0 1 0 input port output port 1 txd1 (open drain) txd1 (3 states) 0 1 0 input port output port 1 txd0 (open drain) txd0 (3 states) note 1: read-modify-write is prohibited for the registers pfcr and pffc. note 2: pf1/rxd0 and pf4/rxd1 pins do not hav e a register changing port /function. for example, when it is used as an input port, the input signal is inputted to sio as the serial receive data. note 3: pf1 and pf3 pins dose not have a register changing 3 states/open drain. figure 3.5.33 register for port f pf (003ch) pfcr (003eh) pffc (003fh)
tmp92c820 2007-02-16 92c820-90 3.5.13 port g (pg0 to pg4) pg0 to pg4 are 5-bit input port and can also be used as the analog input pins for the internal ad converter. pg3 can also be used as adtrg pin for the ad converter. figure 3.5.34 port g port g register 7 6 5 4 3 2 1 0 bit symbol pg4 pg3 pg2 pg1 pg0 read/write r after reset data from external port note: the input channel selection of ad converte r and the permission of adtrg input are set by ad converter mode register admod1. figure 3.5.35 register for port g internal data bus adtrg (only pg3) pg read port g pg0 to pg4 (an0 to an4) ad convertor channel selector ad read convertion result register pg (0040h)
tmp92c820 2007-02-16 92c820-91 3.5.14 port j (pj0 to pj7) pj0 to pj7 are 8-bit output port. resetting sets the output latch pj to ?1? and pj0 to pj7 pins output ?1?. in addition to functioning as output port, port j also functions as output pins for sdram ( sdras , sdcas , sdwe , sdlldqm, sdludqm, sduldq m, sduudqm, sdcke) and sram ( srwr , srllb , srlub , srulb , sruub ). above setting is used the function register pjfc. figure 3.5.36 port j internal data bus function control2 (on bit basis) reset pjfc2 write pj write pj read pj0 ( sdras ) pj1 ( sdcas ) pj2 ( sdwe , srwr ) pj3 (sdlldqm, srllb ) pj4 (sdludqm, srlub ) pj5 (sduldqm, srulb ) pj6 (sduudqm, sruub ) pj7 (sdcke) function control (on bit basis) pjfc write output latch s a selector b c ?1?, ?1?, srwr , srllb , srlub , srulb , sruub , ?1? sdras , sdcas , sdwe , sdlldqm, sdludqm, sduldqm, sduudqm, sdcke outpt buffer
tmp92c820 2007-02-16 92c820-92 port j register 7 6 5 4 3 2 1 0 bit symbol pj7 pj6 pj 5 pj4 pj3 pj2 pj1 pj0 read/write r/w after reset 1 1 1 1 1 1 1 1 port j function register 7 6 5 4 3 2 1 0 bit symbol pj7f pj6f pj5f pj4f pj3f pj2f pj1f pj0f read/write w after reset 0 0 0 0 0 0 0 0 function 0: port 1: sdcke 0: port 1: sduudqm 0: port 1: sduldqm 0: port 1: sdludqm 0: port 1: sdlldqm 0: port 1: sdwe 0: port 1: sdcas 0: port 1: sdras port j function register 2 7 6 5 4 3 2 1 0 bit symbol ? pj6f2 pj5f2 pj4f2 pj3f2 pj2f2 ? ? read/write w after reset 0 0 0 0 0 0 0 0 function always write ?0?. 0: 1: sruub 0: 1: srulb 0: 1: srlub 0: 1: srllb 0: 1: srwr always write ?0?. always write ?0?. note: read-modify-write is prohibit ed for the registers pjfc and pjfc2. figure 3.5.37 register for port j pj (004ch) pjfc (004fh) pjfc2 (004dh)
tmp92c820 2007-02-16 92c820-93 3.5.15 port k (pk0 to pk4, pk6) port k is 6-bit output port. resetting sets th e output latch pk to ?1?, and port k pins output to ?1?. in addition to functioning as output ports, port k also functions as output pins for lcd controller (d1bscp, d2blp, d3bfr, dlebcd and doffb), output pins for rtc alarm ( alarm ) and output pin for melody/alarm generator (mldalm, mldalm ). above setting is used the function register pkfc. only pk6 has two output function which alarm and mldalm . this selection is used pk. resetting resets the f unction register pkfc to ?0?, and sets all ports to output ports. figure 3.5.38 port k (pk0 to pk4) internal data bus reset output latch pk write s a selector b pk read pk0 (d1bscp) pk1 (d2blp) pk2 (d3bfr) pk3 (dlebcd) pk4 (doffb) function control (on bit basis) pkfc write outpt buffer d1bscp, d2blp, d3bfr, dlebcd, doffb
tmp92c820 2007-02-16 92c820-94 figure 3.5.39 port k (pk6) port k register 7 6 5 4 3 2 1 0 bit symbol pk6 pk4 pk3 pk2 pk1 pk0 read/write r/w r/w after reset 1 1 1 1 1 1 port k function register 7 6 5 4 3 2 1 0 bit symbol pk6f pk4f pk3f pk2f pk1f pk0f read/write w w after reset 0 0 0 0 0 0 function 0: port 1: alarm at = 1 1: mldalm at = 0 0: port 1: doffb 0: port 1: dlebcd 0: port 1: d3bfr 0: port 1: d2blp 0: port 1: d1bscp note: read-modify-write is prohibited for the register pkfc. figure 3.5.40 register for port k internal data bus reset pk write pf read pk6 ( alarm , mldalm ) function control (on bit basis) pkfc write s output latch s a selector b mldalm s a selector b alarm pk (0050h) pkfc (0053h)
tmp92c820 2007-02-16 92c820-95 3.5.16 port l (pl0 to pl7) pl0 to pl7 are 8-bit general-purpose i/o ports. each bit can be set individually for input or output using the control register plcr. resetting, the control register plcr to ?0? and sets port l to input ports. it also sets all bits of the output latch regi ster to ?1?. in additi on to functioning as a general-purpose i/o port, port l can also function as a data bu s for lcd controller (ld0 to ld7). above setting is used the function register plfc. figure 3.5.41 port l internal data bus direction control (on bit basis) reset plcr write pl write pl read port e pl0 to pl7 (ld0 to ld7) function control (on bit basis) plfc write s output latch s b selector a s a selector b ld7 to ld0
tmp92c820 2007-02-16 92c820-96 port l register 7 6 5 4 3 2 1 0 bit symbol pl7 pl6 pl5 pl4 pl3 pl2 pl1 pl0 read/write r/w after reset data from external port (output latch register is set to 1) port l control register 7 6 5 4 3 2 1 0 bit symbol pl7c pl6c pl5c pl4c pl3c pl2c pl1c pl0c read/write w after reset 0 0 0 0 0 0 0 0 function 0: input 1: output port l function register 7 6 5 4 3 2 1 0 bit symbol pl7f pl6f pl5f pl4f pl3f pl2f pl1f pl0f read/write w after reset 0 0 0 0 0 0 0 0 function 0: port 1: data bus for lcdc (ld7 to ld0) figure 3.5.42 register for port l pl (0054h) plcr (0056h) plfc (0057h)
tmp92c820 2007-02-16 92c820-97 3.6 memory controller 3.6.1 functions tmp92c820 has a memory contro ller with a variable 4-block address area that controls as follows. (1) 4-block address area support specifies a start address and a block size for 4-block address area (block 0 to block 5). (2) connecting memory specifications specifies sram, rom as memories to connect with the selected address areas. (3) data bus size selection whether 8 bits, 16 bits or 32 bits is selected as the data bus size of the respective block address areas. (4) wait control wait specification bit in the control register and wait input pin control the number of waits in the external bus cycle. read cycle and write cycle can specify the number of waits individually. the number of waits is controlled in five mode mentioned below. 0 waits, 1 wait, 2 waits, 3 waits n waits (control with wait pin)
tmp92c820 2007-02-16 92c820-98 3.6.2 control register and operation after reset release this section describes the regi sters to control the memory controller, the state after reset release and nece ssary settings. (1) control register the control registers of the memory controller are as follows. ? control register: bncsh/bncsl (n = 0 to 3, ex) sets the basic functions of the memory co ntroller, that is th e connecting memory type, the number of waits to be read and written. ? memory start address register: msarn (n = 0 to 3) sets a start address in th e selected address areas. ? memory address mask register: mamr (n = 0 to 3) sets a block size in the selected address areas. in addition to setting of the above-mentioned registers, it is necessary to set the following registers to control rom page mode access. ? page rom control register: pmemcr sets to executed rom page mode accessing. (2) operation after reset release the start data bus size is determined depending on the state of am1/am0 pins just after reset release. then, the extern al memory is acce ssed as follows: am1 am0 start mode 0 0 don?t use this setting 0 1 start with 16-bit data bus 1 0 start with 32-bit data bus 1 1 don?t use this setting am1/am0 pins are valid only just after reset release. in the other cases, the data bus width is set to the value set to bnbus bit of the control register. after reset, only control register (b2csh/b2csl) of the block address area 2 is automatically valid. the data bus width which is specified by am1/am0 pin is loaded to the bit to specify the bus width of the control register in the block address area 2. the block address area 2 is set to address 000000h to ffffffh after reset. after reset release, the block address areas are specified by the memory start address register (msarn) and the memory address mask register (mamrn). then the control register (bncs) is set. set the enable bit (bne) of the control register to ?1? to enable the setting.
tmp92c820 2007-02-16 92c820-99 3.6.3 basic functions and register setting in this section, setting of the block address area, the connecting memory, and the number of waits out of the memory controller?s functions are described. (1) block address area specification the block address area is specified by two registers. the memory start address register (msarn) sets the start address of the block address areas. the memory controller compares between the register value and the address every bus cycles. the address bit which is masked by the memory address mask register (mamrn) is no t compared by the memory controller. the block address area size is determined by setting the memory address mask register. the set value in the register is compared with the block address area on the bus. if the compared result is a match, the memory controller sets the chip select signal ( csn ) to ?low?. (i) setting memory st art address register the ms23 to ms16 bits of the memory start address register respectively correspond with addresses a23 to a16. the lower start address a15 to a0 are always set to address 0000h. therefore the start address of the block address area are set to addresses 000000h to ff0000h every 64 kbytes. (ii) setting memory a ddress mask registers the memory address mask re gister sets whether an a ddress bit is compared or not. set the register to ?0? to co mpare, or to ?1? not to compare. the address bit to be set is depended on the block address area. block address area 0: a20 to a8 block address area 1: a21 to a8 block address area 2 to 3: a22 to a15 the above-mentioned bits are always compared. the block address area size is determined by the compared result. the size to be set depending on the block address area is as follows. size (bytes) cs area 256 512 32 k 64 k 128 k 256 k 512 k 1 m 2 m 4 m 8 m cs0 cs1 cs2 to cs3 note: after reset release, only the control register of the block address area 2 is valid. the control register of the block address area 2 has bit. setting bit to ?0? sets the block address area 2 to addresses 000000h to ffffffh. setting bit to ?1? specifies the start address and the address area size as it is in the other block address area.
tmp92c820 2007-02-16 92c820-100 (iii) example of register setting to set the block address area 512 bytes from address 110000h, set the register as follows. msar1 register 7 6 5 4 3 2 1 0 bit symbol m1s23 m1s22 m1s21 m1s20 m1s19 m1s18 m1s17 m1s16 specified value 0 0 0 1 0 0 0 1 m1s23 to m1s16 bits of the memory st art address register msar1 correspond with address a23 to a16. a15 to a0 are se t to ?0?. therefore setting msar1 to the above-mentioned value specifies the start address of the block address area to address 110000h. the start address is set as it is in the other block address areas. mamr1 register 7 6 5 4 3 2 1 0 bit symbol m1v21 m1v20 m1v19 m1v18 m1v17 m1v16 m1v15 to m1v9 m1v8 specified value 0 0 0 0 0 0 0 1 m1v21 to m1v16 and m1v8 bits of the memory address mask register mamr1 set whether address a21 to a16 and a8 are co mpared or not. set the register to ?0? to compare, or to ?1? not to compare. m1 v15 to m1v9 bits set whether address a15 to a9 are compared or not with 1 bit. a23 and a22 are always compared. setting the above-mentioned compares a23 to a9 with the values set as the start addresses. therefore 512 bytes of addresses 110000h to 1101ffh are set as the block address area 1, and compared with the addresses on the bus. if the compared result is a match, the chip select signal cs1 is set to ?low?. the other block address area sizes are specified like this. similarly, a23 is always compared in bl ock address areas 2 to 3. whether a22 to a15 are compared or not is set to register. note: when the set block address area over laps with the built-in memory area, or both two address areas overlap, t he block address area is processed according to priority as follows. built-in i/o > built-in memory > block address area 0 > 1 > 2 > 3 > csex also that any accessed areas out side the address spaces set by cs0 to cs3 are processed as the csex space. ther efore, settings of csex apply for the control of wait cycles, data bus width, etc,.
tmp92c820 2007-02-16 92c820-101 (2) connection memory specification setting the bnom1 to 0 bit of the control register (bncsh) specifies the memory type to be connected with the block address areas. the interface signal is output according to the set memory as follows bnom1, bnom0 bit (bncsh register) bnom1 bnom0 function 0 0 sram/rom (default) 0 1 (reserved) 1 0 (reserved) 1 1 sdram sdram is set only in block address are 1. (3) data bus width specification the data bus width is set for every block address area. the bus size is set by the bnbus1 and bnbus0 bits of the control register (bncsh) as follows. bnbus bit (bncsh register) bnbus1 bnbus0 function 0 0 8-bit bus mode (default) 0 1 16-bit bus mode 1 0 32-bit bus mode 1 1 (reserved) this way of changing the data bus size depending on the address being accessed is called ?dynamic bus sizing?. the part where the data is output to is depended on the data size, the bus width and the start address. note: since there is a possibility of abnormal writing/reading of the data if two memories with different bus width are put in consec utive address, do not execute a access to both memories with one command.
tmp92c820 2007-02-16 92c820-102 cpu data operand data size (bit) operand start address memory data size (bit) cpu address d32 to d24 d23 to d16 d15 to d8 d7 to d0 4n + 0 8/16/32 4n + 0 xxxxx xxxxx xxxxx b7 to b0 8 4n + 1 xxxxx xxxxx xxxxx b7 to b0 4n + 1 16/32 4n + 1 xxxxx xxxxx b7 to b0 xxxxx 8/16 4n + 2 xxxxx xxxxx xxxxx b7 to b0 4n + 2 32 4n + 2 xxxxx b7 to b0 xxxxx xxxxx 8 4n + 3 xxxxx xxxxx xxxxx b7 to b0 16 4n + 3 xxxxx xxxxx b7 to b0 xxxxx 8 4n + 3 32 4n + 3 b7 to b0 xxxxx xxxxx xxxxx (1) 4n + 0 xxxxx xxxxx xxxxx b7 to b0 8 (2) 4n + 1 xxxxx xxxxx xxxxx b15 to b8 4n + 0 16/32 4n + 0 xxxxx xxxxx b15 to b8 b7 to b0 (1) 4n + 1 xxxxx xxxxx xxxxx b7 to b0 8 (2) 4n + 2 xxxxx xxxxx xxxxx b15 to b8 (1) 4n + 1 xxxxx xxxxx b7 to b0 xxxxx 16 (2) 4n + 2 xxxxx xxxxx xxxxx b15 to b8 4n + 1 32 4n + 1 xxxxx b15 to b8 b7 to b0 xxxxx (1) 4n + 2 xxxxx xxxxx xxxxx b7 to b0 8 (2) 4n + 1 xxxxx xxxxx xxxxx b15 to b8 16 4n + 2 xxxxx xxxxx b15 to b8 b7 to b0 4n + 2 32 4n + 2 b15 to b8 b7 to b0 xxxxx xxxxx (1) 4n + 3 xxxxx xxxxx xxxxx b7 to b0 8 (2) 4n + 4 xxxxx xxxxx xxxxx b15 to b8 (1) 4n + 3 xxxxx xxxxx b7 to b0 xxxxx 16 (2) 4n + 4 xxxxx xxxxx xxxxx b15 to b8 (1) 4n + 3 b7 to b0 xxxxx xxxxx xxxxx 16 4n + 3 32 (2) 4n + 4 xxxxx xxxxx xxxxx b15 to b8 (1) 4n + 0 xxxxx xxxxx xxxxx b7 to b0 (2) 4n + 1 xxxxx xxxxx xxxxx b15 to b8 (3) 4n + 2 xxxxx xxxxx xxxxx b23 to b16 8 (4) 4n + 3 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 0 xxxxx xxxxx b15 to b8 b7 to b0 16 (2) 4n + 2 xxxxx xxxxx b31 to b24 b23 to b16 4n + 0 32 4n + 0 b31 to b24 b23 to b16 b15 to b8 b7 to b0 (1) 4n + 0 xxxxx xxxxx xxxxx b7 to b0 (2) 4n + 1 xxxxx xxxxx xxxxx b15 to b8 (3) 4n + 2 xxxxx xxxxx xxxxx b23 to b16 8 (4) 4n + 3 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 1 xxxxx xxxxx b7 to b0 xxxxx (2) 4n + 2 xxxxx xxxxx b23 to b16 b15 to b8 16 (3) 4n + 4 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 1 b23 to b16 b15 to b8 b7 to b0 xxxxx 4n + 1 32 (2) 4n + 4 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 2 xxxxx xxxxx xxxxx b7 to b0 (2) 4n + 3 xxxxx xxxxx xxxxx b15 to b8 (3) 4n + 4 xxxxx xxxxx xxxxx b23 to b16 8 (4) 4n + 5 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 2 xxxxx xxxxx b15 to b8 b7 to b0 16 (2) 4n + 4 xxxxx xxxxx b31 to b24 b23 to b16 (1) 4n + 2 b15 to b8 b7 to b0 xxxxx xxxxx 4n + 2 32 (2) 4n + 4 xxxxx xxxxx b31 to b24 b23 to b16 (1) 4n + 3 xxxxx xxxxx xxxxx b7 to b0 (2) 4n + 4 xxxxx xxxxx xxxxx b15 to b8 (3) 4n + 5 xxxxx xxxxx xxxxx b23 to b16 8 (4) 4n + 6 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 3 xxxxx xxxxx b7 to b0 xxxxx (2) 4n + 4 xxxxx xxxxx b23 to b16 b15 to b8 16 (3) 4n + 6 xxxxx xxxxx xxxxx b31 to b24 (1) 4n + 3 b7 to b0 xxxxx xxxxx xxxxx 32 4n + 3 32 (2) 4n + 4 xxxxx b31 to b24 b23 to b16 b15 to b8 xxxxx: during a read, data input to t he bus is ignored. at write, the bus is at high impedance and the write strobe signal remains to non active.
tmp92c820 2007-02-16 92c820-103 (4) wait control the external bus cycle completes a wait of two states at least (100 ns at 20 mhz). setting the bnww2 to bnww0 and bnwr2 to bnwr0 of the control register (bncsl) specifies the number of waits in the read cycle and the write cycle. bnww is set with the same method as bnwr. bnww/bnwr bit (bncsl register) bnww2 bnwr2 bnww1 bnwr1 bnww0 bnwr0 function 0 0 1 2states (0 waits) access fixed mode 0 1 0 3states (1 wait) access fixed mode (default) 1 0 1 4states (2 waits) access fixed mode 1 1 0 5states (3 waits) access fixed mode 1 1 1 6states (4 waits) access fixed mode 0 1 1 wait pin input mode others (reserved) note: when sdram is specified as a connecting memory, setting should be 4 states (2 waits) in rd cycle and 3 states (1 wait) in wr cycle. (i) waits number fixed mode the bus cycle is completed with the set states. the number of states is selected from 2 states (0 waits) to 5 states (3 waits). (ii) wait pin input mode this mode samples the wait input pins. it continuously samples the wait pin state and inserts a wait if the pin is active. the bus cycle is minimum 2 states. the bus cycle is completed when the wait signal is non active (?high? level) at 2 states. the bus cycle extends if the wait signal is active at 2 states and more. (5) insert recovery cycle if a lot of connected pertain rom and et c. (much data output floating time (t df )), each other?s data-bus-output-recovery-time is trouble. however, by setting bnrec of control register (bncsh), can insert dummy cycl e of 1 state just before first bus cycle of starting access another block address. bnrec bit (bncsh register) 0 no dummy cycle is inserted (default). 1 dummy cycle is inserted. note: when use mmu, built-in ram type lcdd, this function cannot use.
tmp92c820 2007-02-16 92c820-104 ? when not inserting a dummy cycle (0 waits) ? when inserting a dummy cycle (0 waits) (6) basic bus timing ? external read/write bus cycle (0 waits) ? external read/write bus cycle (1 wait) sdclk address csm csn rd sdclk address csm csn rd dumm y cs wrxx rd address in p ut out p ut read write sdclk (20 mhz) d31 to d0 d31 to d0 t1 t2 cs rd address output sdclk (20 mhz) d31 to d0 d31 to d0 t1 tw in p ut read write t2 wrxx
tmp92c820 2007-02-16 92c820-105 ? external read/write bus cycle (0 waits at wait pin input mode) ? external read/write bus cycle (n waits at wait pin input mode) cs rd address in p ut out p ut read write sdclk (20 mhz) d31 to d0 d31 to d0 t1 t2 wait sam p lin g wrxx cs rd address output sdclk (20 mhz) d31 to d0 d31 to d0 t1 tw in p ut read w t2 wait sam p lin g sam p lin g wrxx
tmp92c820 2007-02-16 92c820-106 ? example of wait input cycle (5 waits) csn wr rd wait d q ck res d q ck res d q ck res d q ck res d q ck res sdclk ff0 ff1 ff2 ff3 ff4 sdclk (20 mhz) 12 3 4 5 6 7 csn rd wait ff _ res ff0 _ d ff0 _ q ff1 _ q ff2 _ q ff3 _ q
tmp92c820 2007-02-16 92c820-107 3.6.4 rom control (page mode) this section describes rom pa ge mode accessing and how to set registers. rom page mode is set by the page rom control register. (1) operation and how to set the registers tmp92c820 supports rom access of the pa ge mode. the rom access of the page mode is specified only in the block address area 2. rom page mode is set by the page rom control register (pmemcr). setting opge bit of the pmemcr register to ?1? sets the memory access of the block address area to rom page mode access. the number of read cycles is set by the opwr1 and opwr0 bits of the pmemcr register. opwr1/opwr0 bit (pmemcr register) opwr1 opwr0 number of cycle in a page 0 0 1 state (n-1-1-1 mode) (n 2) 0 1 2 state (n-2-2-2 mode) (n 3) 1 0 3 state (n-3-3-3 mode) (n 4) 1 1 (reserved) note: set the number of waits ?n? to the control register (bncsl) in each block address area. the page size (the number of bytes) of rom in the cpu size is set to the pr1 and 0 bit of the pmcme register. when data is read out until a border of the set page, the controller completes the page reading operation. the start data of the next page is read in the normal cycle. the following data is set to page read again. pr1/pr0 bit (pmemcr register) pr1 pr0 rom page size 0 0 64 bytes 0 1 32 bytes 1 0 16 bytes (default) 1 1 8 bytes (2) signal timing pulse t h a data in p ut data in p ut data in p ut data in p ut t cyc a 0~a23 sdclk d0~d31 rd cs2 + 0 + 1 + 2 + 3 t ad3 t ad2 t ad2 t ad2 t hr t h a t h a t h a t rd3
tmp92c820 2007-02-16 92c820-108 3.6.5 list of registers the memory control registers and the settings are described as follows. for the addresses of the registers, see section 5 ?table of special function registers (sfrs)?. (1) control registers the control register is a pair of bncsl and bncsh. (n is a number of the block address area.) bncsl has the same configuration regardless of the block address areas. in bncsh, only b2csh which is corresponded to the block address area 2 has a different configuration from the others. bncsl 7 6 5 4 3 2 1 0 bit symbol bnww2 bnww1 bnww0 bnwr2 bnwr1 bnwr0 read/write w w after reset 0 1 0 0 1 0 bnww<2:0> specifies the number of write waits. 001 = 2 states (0 waits) access 010 = 3 states (1 wait) access 101 = 4 states (2 waits) access 110 = 5 states (3 waits) access 111 = 6 states (4 waits) access 011 = wait pin input mode others = (reserved) bnwr<2:0> specifies the number of read waits. 001 = 2 states (0 waits) access 010 = 3 states (1 wait) access 101 = 4 states (2 waits) access 110 = 5 states (3 waits) access 111 = 6 states (4 waits) access 011 = wait pin input mode others = (reserved) b2csh 7 6 5 4 3 2 1 0 bit symbol b2e b2m b2rec b2om1 b2om0 b2bus1 b2bus0 read/write w w after reset 1 0 0 0 0 0/1 0/1 b2e: enable bit 0 = no chip select signal output. 1 = chip select signal output (default). note: after reset release, only the enable bit b2e of b2cs register is valid (?1?). b2m: block address area specification 0 = sets the block address area of cs2 to addresses 000000h to ffffffh (default). 1 = sets the block address area of cs2 to programmable. note: after reset release, the block address area 2 is set to addresses 000000h to ffffffh.
tmp92c820 2007-02-16 92c820-109 b2rec: sets the dummy cycle for data output recovery time. 0 = not insert a dummy cycle (default). 1 = insert a dummy cycle. note: when using mmu, lcd of built-in ram type, this function cannot use. b2om<1:0> 00 = sram or rom (default) others = (reserved) b2bus<1:0> sets the data bus width. 00 = 8 bits (default) 01 = 16 bits 10 = 32 bits 11 = (reserved) note: the value of b2bus bit is set according to the state of am<1:0> pin after reset release. bncsh (n = 0, 1, 3) 7 6 5 4 3 2 1 0 bit symbol bne bnrec bnom1 bnom0 bnbus1 bnbus0 read/write w w after reset 0 0 0 0 0 0 bne: enable bit 0 = no chip select signal output (default). 1 = chip select signal output. note: after reset release, only the enable bit b2e of b2cs register is valid (?1?). bnrec: sets the dummy cycle for data output. 0 = not insert a dummy cycle (default). 1 = insert a dummy cycle. note: when using mmu, lcd of built-in ram type, this function cannot use. bnom<1:0> 00 = sram or rom (default) 01 = (reserved) 10 = (reserved) 11 = sdram note: sdram is set only by b1csh. bnbus<1:0> sets the data bus width. 00 = 8 bits (default) 01 = 16 bits 10 = 32 bits 11 = (reserved)
tmp92c820 2007-02-16 92c820-110 bexcsl 7 6 5 4 3 2 1 0 bit symbol bexww2 bexww1 bexww0 bexwr2 bexwr1 bexwr0 read/write w w after reset 0 1 0 0 1 0 bexww<2:0> specifies the number of write waits. 001 = 2 states (0 waits) access 010 = 3 states (1 wait) access 101 = 4 states (2 waits) access 110 = 5 states (3 waits) access 111 = 6 states (4 waits) access 011 = wait pin input mode others = (reserved) bexwr<2:0> specifies the number of read waits. 001 = 2 states (0 waits) access 010 = 3 states (1 wait) access 101 = 4 states (2 waits) access 110 = 5 states (3 waits) access 111 = 6 states (4 waits) access 011 = wait pin input mode others = (reserved) bexcsh 7 6 5 4 3 2 1 0 bit symbol bexom1 bexom0 bexbus1 bexbus0 read/write w after reset 0 0 0 0 bexom<1:0> 00 = sram or rom (default) 01 = (reserved) 10 = (reserved) 11 = (reserved) bexbus<1:0> sets the data bus width. 00 = 8 bits (default) 01 = 16 bits 10 = 32 bits 11 = (reserved)
tmp92c820 2007-02-16 92c820-111 (2) block address register a start address and an address area of the block address are specified by the memory start address register (msarn) and the memo ry address mask register (mamrn). the memory start address re gister sets all start address si milarly regardless of the block address areas. the bit to be set by the memory address mask register is depended on the block address area. msarn (n = 0 to 3) 7 6 5 4 3 2 1 0 bit symbol mns23 mns22 mns21 mns20 mns19 mns18 mns17 mns16 read/write r/w after reset 1 1 1 1 1 1 1 1 mns<23:16> sets a start address. sets the start address of the block address areas. t he bits are corresponding to the address a23 to a16. mamr0 7 6 5 4 3 2 1 0 bit symbol m0v20 m0v19 m0v18 m0v17 m0v16 m0v15 m0v14 to m0v9 m0v8 read/write r/w after reset 1 1 1 1 1 1 1 1 m0v<20:8> enables or masks comparison of the addresses. m0v20 to m0v8 are corresponding to addresses a20 to a8. the bits of m0v14 to m0v9 are corresponding to address a14 to a9 by 1 bit. if ?0? is set, the comparison between the value of the address bus and the start address is enabled. if ?1? is set, the comparison is masked. mamr1 7 6 5 4 3 2 1 0 bit symbol m1v21 m1v20 m1v19 m1v18 m1v17 m1v16 m1v15 to m1v9 m1v8 read/write r/w after reset 1 1 1 1 1 1 1 1 m1v<21:8> enables or masks comparison of the addresses. m1v21 to m1v8 are corresponding to addresses a21 to a8. the bits of m1v15 to m1v9 are corresponding to address a15 to a9 by 1 bit. if ?0? is set, the comparison between the value of the address bus and the start address is enabled. if ?1? is set, the comparison is masked. mamrn (n = 2 to 3) 7 6 5 4 3 2 1 0 bit symbol mnv22 mnv21 mnv20 mnv19 mnv18 mnv17 mnv16 mnv15 read/write r/w after reset 1 1 1 1 1 1 1 1 mnv<22:15> enables or masks comparison of the addresses. mnv22 to mnv1 5 are corresponding to addresses a22 to a15. if ?0? is set, the comparison between the value of the address bus and t he start address is enabled. if ?1? is set, the comparison is masked. after a reset, masr0 to masr3 and mamr0 to mamr3 are set to ?ffh?. b0csh, b1csh, and b3csh are reset to ?0?. this disabling the cs0, cs1, and cs3 areas. however, b2csh< b2m> is reset to ?0? and b2csh to ?1?, and cs2 is enabled 000000h to ffffffh . also the bus width and number of waits specified in bexcsh/l are used for accessing address except the specified cs0 to cs3 area.
tmp92c820 2007-02-16 92c820-112 (3) page rom control register (pmemcr) the page rom control register sets page rom accessing. rom page accessing is executed only in block address area 2. pmemcr 7 6 5 4 3 2 1 0 bit symbol opge opwr1 opwr0 pr1 pr0 read/write r/w after reset 0 0 0 1 0 opge enable bit 0 = no rom page mode accessing (default) 1 = rom page mode accessing opwr<1:0> specifies the number of waits. 00 = 1 state (n-1-1-1 mode) (n 2) (default) 01 = 2 states (n-2-2-2 mode) (n 3) 10 = 3 states (n-3-3-3 mode) (n 4) 11 = (reserved) note: set the number of waits ?n? to the control register (bncsl) in each block address area. pr<1:0> rom page size 00 = 64 bytes 01 = 32 bytes 10 = 16 bytes (default) 11 = 8 bytes
tmp92c820 2007-02-16 92c820-113 table 3.6.1 control register 7 6 5 4 3 2 1 0 bit symbol b0ww2 b0ww1 b0ww0 b0wr2 b0wr1 b0wr0 read/write w w after reset 0 1 0 0 1 0 bit symbol b0e ? ? b0rec b0om1 b0om0 b0bus1 b0bus0 read/write w after reset 0 0 (note) 0 (note) 0 0 0 0/1 0/1 bit symbol m0v20 m0v19 m0v18 m0v17 m0v16 m0v15 m0v14-v9 m0v8 read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol m0s23 m0s22 m0s21 m0s20 m0s19 m0s18 m0s17 m0s16 read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol b1ww2 b1ww1 b1ww0 b1wr2 b1wr1 b1wr0 read/write w w after reset 0 1 0 0 1 0 bit symbol b1e ? ? b1rec b1om1 b1om0 b1bus1 b1bus0 read/write w after reset 0 0 (note) 0 (note) 0 0 0 0/1 0/1 bit symbol m1v21 m1v20 m1v19 m1v18 m1v17 m1v16 m1v15-v9 m1v8 read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol m1s23 m1s22 m1s21 m1s20 m1s19 m1s18 m1s17 m1s16 read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol b2ww2 b2ww1 b2ww0 b2wr2 b2wr1 b2wr0 read/write w w after reset 0 1 0 0 1 0 bit symbol b2e b2m ? b2rec b2om1 b2om0 b2bus1 b2bus0 read/write w after reset 1 0 0 (note) 0 0 0 0/1 0/1 bit symbol m2v22 m2v21 m2v20 m2v19 m2v18 m2v17 m2v16 m2v15 read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol m2s23 m2s22 m2s21 m2s20 m2s19 m2s18 m2s17 m2s16 read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol b3ww2 b3ww1 b3ww0 b3wr2 b3wr1 b3wr0 read/write w w after reset 0 1 0 0 1 0 bit symbol b3e ? ? b3rec b3om1 b3om0 b3bus1 b3bus0 read/write w after reset 0 0 (note) 0 (note) 0 0 0 0/1 0/1 bit symbol m3v22 m3v21 m3v20 m3v19 m3v18 m3v17 m3v16 m3v15 read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol m3s23 m3s22 m3s21 m3s20 m3s19 m3s18 m3s17 m3s16 read/write r/w after reset 1 1 1 1 1 1 1 1 bit symbol bexom1 bexom0 bexbus1 bexbus0 read/write w after reset 0 0 0 0 bit symbol bexww2 bexww1 bexww0 bexwr2 bexwr1 bexwr0 read/write w w after reset 0 1 0 0 1 0 bit symbol opge opwr1 opwr0 pr1 pr0 read/write r/w after reset 0 0 0 1 0 note: always write ?0?. b0csl (0140h) b0csh (0141h) mamr0 (0142h) msar0 (0143h) b1csl (0144h) b1csh (0145h) mamr1 (0146h) msar1 (0147h) b2csl (0148h) b2csh (0149h) mamr2 (014ah) msar2 (014bh) b3csl (014ch) b3csh (014dh) mamr3 (014eh) msar3 (014fh) bexcsh (0159h) bexcsl (0158h) pmemcr (0166h)
tmp92c820 2007-02-16 92c820-114 3.6.6 cautions (1) note on timing between cs and rd if the parasitic capacitance of the read signal (output enable signal) is greater than that of the chip select signal, it is possible that an unintended read cycle occurs due to a delay in the read signal. such an unintended read cycle may cause a trouble as in the case of (a) in 0h figure 3.6.1 figure 3.6.1 read signal delay read cycle example: when using an externally co nnected flash eeprom which users jedec standard commands, note that the toggle bit may not be read out correctly. if the read signal in the cycle immediately preceding the access to the flash eeprom does not go high in time, as shown in 1h figure 3.6.2 an unintended read cycle like the one shown in (b) may occur. figure 3.6.2 flash eeprom toggle bit read cycle when the toggle bit reverse with this unexp ected read cycle, tm p92c820 always reads same value of the toggle bit, and cann ot read the toggle bit correctly. to avoid this phenomena, the data polling control recommended. rd address sdclk (20 mhz) memory 1cs memory 2cs (a) address sdclk (20 mhz) flash eeprom chip select read (b) toggle bit memor y access toggle bit rd c y cle 1
tmp92c820 2007-02-16 92c820-115 (2) the cautions at the time of the functional change of a csn . a chip select signal output has the case of a combination terminal with a general-purpose port function. in this case, an output latch register and a function control register are initialized by the reset action, and an object terminal is initialized by the port output (?1? or ?0?) by it. functional change although an object terminal is changed from a port to a chip select signal output by setting up a function control register (pnf c register), the short pulse for several ns may be outputted to the changing timing. although it does not become especially a problem when using the usual memory, it ma y become a problem when using a special memory. x x n+2 internal address bus function control signal pxx n n+2 a23 to a0 a port is set as csn . n output port csn internal signal external signal output pulse t ad3 * xx is a function register address.(when an output port is initialized by ?0?) the measure by software the countermeasures in s/w for avoiding this phenomenon are explained. since cs signal decodes the address of the access area and is generated, an unnecessary pulse is outputted by access to the object cs area immediately after setting it as a csn function. then, if intern al area is accessed also immediately after setting a port as cs function, an unnecessary pulse will not output. 1. the ban on interruption under functional change (di command) 2. a dummy command is added in order to carry out continuous internal access. 3. (access to a functional change register is corresponded by 16-bit command. (ldw command)) xx+1 n+2 internal address bus function control signal pxx n n+2 a23 to a0 a port is set as csn . xx output port csn internal signal external signal dummy access
tmp92c820 2007-02-16 92c820-116 3.7 8-bit timers (tmra) the tmp92c820 features 4 built-in 8-bit timers. these timers are paired into four modules: tmra01 and tmra23. each module consists of two channels and can operate in any of the following four operating modes. ? 8-bit interval timer mode ? 16-bit interval timer mode ? 8-bit programmable square wave pulse generation output mode (ppg: variable duty cycle with variable period) ? 8-bit pulse width modulation output mode (pwm : variable duty cycle with constant period) 0h figure 3.7.1 to 1h figure 3.7.2 show block diag rams for tmra01 and tmra23. each channel consists of an 8-bit up counter, an 8-bit comparator and an 8-bit timer register. in addition, a timer flip-flop and a prescale r are provided for each pair of channels. the operation mode and timer flip-flops are controlled by five controls sfr (special function register). each of the two modules (tmra01 and tmra23) can be operated independently. all modules operate in the same manner; hence only the operation of tmra01 is explained here. the contents of this chapter are as follows. 3.7.1 block diagrams 3.7.2 operation of each circuit 3.7.3 sfrs 3.7.4 operation in each mode (1) 8-bit timer mode (2) 16-bit timer mode (3) 8-bit ppg (programmable pulse generation) output mode (4) 8-bit pwm output mode (5) mode setting table 3.7.1 registers and pins for each module module tmra01 tmra23 input pin for external clock ta0in (shared with pc0) no external pin output pin for timer flip-flop ta1out (shared with pc1) ta3out (shared with pc5) timer run register ta01run (1100h) ta23run (1108h) timer register ta0reg (1102h) ta1reg (1103h) ta2reg (110ah) ta3reg (110bh) timer mode register ta01mod (1104h) ta23mod (110ch) sfr (address) timer flip-flop control register ta1ffcr (1105h) ta3ffcr (110dh)
tmp92c820 2007-02-16 92c820-117 3.7.1 block diagrams figure 3.7.1 tmra01 block diagram t1 t16 t256 8-bit comparator (cp1) 8-bit comparator (cp0) 8-bit up counter (uc0) 2 n overflow 8-bit up counter (uc1) timer flip-flop ta1ff match detect match detect 8-bit timer register ta1reg t1 t4 t16 512 256 128 64 32 16 8 4 2 t1 t4 t16 t256 run/clea r prescale r external input clock: ta0in ta01mod prescale r clock: t0 ta01run selecto r 8-bit timer register ta0reg ta01mod ta01mod tmra0 interrupt output: intta0 tmra0 match output: ta0trg ta01mod ta01run ta1ffcr timer flip-flop output: ta1out tmra1 interrupt output: intta1 internal data bus ta01run ta01run selecto r internal data bus t a 0trg register buffer 0
tmp92c820 2007-02-16 92c820-118 figure 3.7.2 tmra23 block diagram t1 t16 t256 8-bit comparator register (cp3) 8-bit comparator (cp2) 8-bit up counter (uc2) 2 n overflow 8-bit up counter (uc3) timer flip-flop ta3ff match detect match detect 8-bit timer register ta3reg t1 t4 t16 512 256 128 64 32 16 8 4 2 t1 t4 t16 t256 run/clea r prescale r ta23mod prescale r clock: t0 ta23run selecto r 8-bit timer register ta2reg ta23mod ta23mod tmra2 interrupt output: intta2 tmra2 match output: ta2trg ta23mod ta23run ta3ffcr timer flip-flop output: ta3out (supply to lcdc) tmra3 interrupt output: intta3 internal data bus ta23run ta23run selecto r internal data bus ta2trg register buffer 2
tmp92c820 2007-02-16 92c820-119 3.7.2 operation of each circuit (1) prescalers a 9-bit prescaler generates the input clock to tmra01. the clock t0 is divided into 8 by the cpu clock f sys and input to this prescaler. the prescaler operation can be controlled using ta01run in the timer control register. setting to ?1? starts the count; setting to ?0? clears the prescaler to 0 and stops operation. 2h table 3.7.2 shows the various prescaler output clock resolutions. table 3.7.2 prescaler output clock resolution timer counter input clock tmra prescaler taxmod clock gear selection syscr1 system clock selection syscr1 ? t1(1/2) t4(1/8) t16(1/32) t256(1/512) ? 1 (fs) fs/16 fs/64 fs/256 fs/4096 000 (1/1) fc/16 fc/64 fc/256 fc/4096 001 (1/2) fc/32 fc/128 fc/512 fc/8192 010 (1/4) fc/64 fc/256 fc/1024 fc/16384 011 (1/8) fc/128 fc/512 fc/2048 fc/32768 100 (1/16) 0 (fc) 1/8 fc/256 fc/1024 fc/4096 fc/65536 (2) up counters (uc0 and uc1) these are 8-bit binary counters which count up the input clock pulses for the clock specified by ta01mod. the input clock for uc0 is selectable and can be either the external clock input via the ta0in pin or one of the three internal clocks t1, t4 or t16. the clock setting is specified by the value set in ta01mod. the input clock for uc1 depends on the operation mode. in 16-bit timer mode, the overflow output from uc0 is used as the input clock. in any mode other than 16-bit timer mode, the input clock is selectable and can either be one of the internal clocks t1, t16, or t256, or the comparator output (the match detection signal) from tmra0. for each interval timer the timer operation control register bits ta01run and ta01run can be used to stop and clear the up counters and to control their count. a reset clears both up counters, stopping the timers.
tmp92c820 2007-02-16 92c820-120 (3) timer registers (ta0reg and ta1reg) these are 8-bit registers, which can be used to set a time interval. when the value set in the timer register ta0reg or ta1reg matches the value in the corresponding up counter, the comparator match detect signal goes active. if the value set in the timer register is 00h, the signal goes active when the up counter overflows. the ta0reg are double buffer structure, each of which makes a pair with register buffer. the setting of the bit ta01run determines whether ta0reg?s double buffer structure is enabled or disabled. it is disabled if = ?0? and enabled if = ?1?. when the double buffer is enabled, data is transferred from the register buffer to the timer register when a 2 n overflow occurs in pwm mode, or at the start of the ppg cycle in ppg mode. hence the double buffer cannot be used in timer mode. a reset initializes to ?0?, disabling the double buffer. to use the double buffer, write data to the timer register, set to ?1?, and write the following data to the register buffer 3h figure 3.7.3 show the configuration of ta0reg. figure 3.7.3 configuration of ta0reg note: the same memory address is allocated to the timer register and the register buffer. when = 0, the same value is written to the register buffer and the timer register; when = 1, only the register buffer is written to. the address of each timer register is as follows. ta0reg: 001102h ta1reg: 001103h ta2reg: 00110ah ta3reg: 00110bh all these registers are wr ite-only and cannot be read. internal data bus ta01run timer registers 0 (ta0reg) register buffers 0 shift trigger b selector sa write write to ta0reg matching detection in ppg cycle 2 n overflow of pwm
tmp92c820 2007-02-16 92c820-121 (4) comparator (cp0) the comparator compares the value in an up counter with the value set in a timer register. if they match, the up counter is cleared to zero and an interrupt signal (intta0 or intta1) is generated. if timer flip-flop inversion is enabled, the timer flip-flop is inverted at the same time. (5) timer flip-flop (ta1ff) the timer flip-flop (ta1ff) is a flip-flop inverted by the match detects signal (8-bit comparator output) of each interval timer. whether inversion is enabled or disabled is determined by the setting of the bit ta 1ffcr in the timer flip-flops control register. a reset clears the value of ta1ff to ?0?. writing ?01? or ?10? to ta1ffcr sets ta1ff to 0 or 1. writing ?00? to these bits inverts the value of ta1ff (this is known as software inversion). the ta1ff signal is output via the ta1out pin (which can also be used as pc1). when this pin is used as the timer output, the timer flip-flop should be set beforehand using the port c function register pcfc. note: when the double buffer is enabled for an 8-bit timer in pwm or ppg mode, caution is required as explained below. if new data is written to the register buffer immediately before an overflow occurs by a match between the timer register value and t he up-counter value, the timer flip-flop may output an unexpected value. for this reason, make sure that in pwm mode new data is written to the register buffer by six cycles (f sys 6) before the next overflow occurs by using an overflow interrupt. when using ppg mode, make sure that new data is written to the register buffer by six cycles before the next cycle compare matc h occurs by using a cycle compare match interrupt. example when using pwm mode ta1out 2 n overflow interrupt (intta0) t pwm (pwm cycle) match between ta0reg and up-counter desired pwm cycle change point write new data to the register buffer before the next overflow occurs by using an overflow interrupt
tmp92c820 2007-02-16 92c820-122 3.7.3 sfrs tmra01 run register 7 6 5 4 3 2 1 0 bit symbol ta0rde i2ta01 ta01prun ta1run ta0run read/write r/w r/w r/w after reset 0 0 0 0 0 tmra01 prescaler up counter (uc1) up counter (uc0) function double buffer 0: disable 1: enable idle2 0: stop 1: operate 0: stop and clear 1: run (count up) timer run/stop control 0 stop and clear 1 run (count up) ta0reg double buffer control 0 disable 1 enable note: the values of bits 4 to 6 of ta01run are undefined when read. tmra23 run register 7 6 5 4 3 2 1 0 bit symbol ta2rde i2ta23 ta23prun ta3run ta2run read/write r/w r/w r/w after reset 0 0 0 0 0 tmra23 prescaler up counter (uc3) up counter (uc4) function double buffer 0: disable 1: enable idle2 0: stop 1: operate 0: stop and clear 1: run (count up) timer run/stop control 0 stop and clear 1 run (count up) ta2reg double buffer control 0 disable 1 enable note: the values of bits 4 to 6 of ta23run are undefined when read. figure 3.7.4 tmra registers (1) ta01run (1100h) ta23run (1108h)
tmp92c820 2007-02-16 92c820-123 tmra01 mode register 7 6 5 4 3 2 1 0 bit symbol ta01m1 ta01m0 pwm01 pwm 00 ta1clk1 ta1clk0 ta0clk1 ta0clk0 read/write r/w after reset 0 0 0 0 0 0 0 0 function operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit ppg mode 11: 8-bit pwm mode pwm cycle 00: reserved 01: 2 6 10: 2 7 11: 2 8 source clock for tmra1 00: ta0trg 01: t1 10: t16 11: t256 source clock for tmra0 00: ta0in pin (note) 01: t1 10: t4 11: t16 tmra0 source clock selection 00 ta0in (external input) 01 t1 10 t4 11 t16 tmra1 source clock selection ta01mod 01 ta01mod = 01 00 comparator output from tmra0 01 t1 10 t16 11 t256 overflow output from tmra0 (16-bit timer mode) pwm cycle selection 00 reserved 01 2 6 source clock 10 2 7 source clock 11 2 8 source clock tmra01 operation mode selection 00 two 8-bit timers 01 16-bit timer 10 8-bit ppg 11 8-bit pwm (tmra0) + 8-bit timer (tmra1) note: when set ta0in pin, must set ta01mod after set port c. figure 3.7.5 tmra registers (2) ta01mod (1104h)
tmp92c820 2007-02-16 92c820-124 tmra23 mode register 7 6 5 4 3 2 1 0 bit symbol ta23m1 ta23m0 pwm21 pwm 20 ta3clk1 ta3clk0 ta2clk1 ta2clk0 read/write r/w after reset 0 0 0 0 0 0 0 0 function operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit ppg mode 11: 8-bit pwm mode pwm cycle 00: reserved 01: 2 6 10: 2 7 11: 2 8 tmra3 clock for tmra3 00: ta2trg 01: t1 10: t16 11: t256 tmra2 clock for tmra2 00: reserved 01: t1 10: t4 11: t16 tmra2 source clock selection 00 do not set 01 t1 10 t4 11 t16 tmra3 source clock selection ta23mod 01 ta23mod = 01 00 comparator output from tmra2 01 t1 10 t16 11 t256 overflow output from tmra2 (16-bit timer mode) pwm cycle selection 00 reserved 01 2 6 source clock 10 2 7 source clock 11 2 8 source clock tmra23 operation mode selection 00 two 8-bit timers 01 16-bit timer 10 8-bit ppg 11 8-bit pwm (tmra2) + 8-bit timer (tmra3) figure 3.7.6 tmra registers (3) ta23mod (110ch)
tmp92c820 2007-02-16 92c820-125 tmra1 flip-flop control register 7 6 5 4 3 2 1 0 bit symbol ta1ffc1 ta1ffc0 ta1ffie ta1ffis read/write r/w r/w after reset 1 1 0 0 function 00: invert ta1ff 01: set ta1ff 10: clear ta1ff 11: don?t care ta1ff control for inversion 0: disable 1: enable ta1ff1 inversion select 0: tmra0 1: tmra1 inverse signal for timer flop-flop 1 (ta1ff) (don?t care except in 8-bit timer mode) 0 inversion by tmra0 1 inversion by tmra1 inversion of ta1ff 0 disabled 1 enabled control of ta1ff 00 inverts the value of ta1ff 01 sets ta1ff to ?1? 10 clears ta1ff to ?0? 11 don?t care note: the values of bits 4 to 7 of ta1ffcr are undefined when read. figure 3.7.7 tmra registers (4) ta1ffcr (1105h) read-modify -write instructions are prohibited.
tmp92c820 2007-02-16 92c820-126 tmra3 flip-flop control register 7 6 5 4 3 2 1 0 bit symbol ta3ffc1 ta3ffc0 ta3ffie ta3ffis read/write r/w r/w after reset 1 1 0 0 function 00: invert ta3ff 01: set ta3ff 10: clear ta3ff 11: don?t care ta3ff control for inversion 0: disable 1: enable ta3ff inversion select 0: tmra2 1: tmra3 inverse signal for timer flip-flop 3 (ta3ff) (don?t care except in 8-bit timer mode) 0 inversion by tmra2 1 inversion by tmra3 inversion of ta3ff 0 disabled 1 enabled control of ta3ff 00 inverts the value of ta3ff 01 sets ta3ff to ?1? 10 clears ta3ff to ?0? 11 don?t care note: the values of bits 4 to 7 of ta3ffcr are undefined when read. figure 3.7.8 tmra register ta3ffcr (110dh) read-modify -write instructions are prohibited.
tmp92c820 2007-02-16 92c820-127 tmra register (ta0reg to ta3reg) symbol address 7 6 5 4 3 2 1 0 ? w ta0reg 1102h undefined ? w ta1reg 1103h undefined ? w ta2reg 110ah undefined ? w ta3reg 110bh undefined note: read-modify-write instruction is prohibited for above registers. figure 3.7.9 register for 8-bit timers
tmp92c820 2007-02-16 92c820-128 3.7.4 operation in each mode (1) 8-bit timer mode both timer 0 and timer 1 can be used in dependently as 8-bit interval timers. 1. generating interrupts at a fixed interval (using tmra1) to generate interrupts at constant inte rvals using timer 1 (intta1), first stop tmra1 then set the operation mode, input clock and a cycle to ta01mod and ta1reg register, respectively. then, enable the interrupt intta1 and start tmra1 counting. example: to generate an intta1 interrupt every 40 s at f c = 40 mhz, set each register as follows: msb lsb 7 6 5 4 3 210 ta01run ? x x x ? ? 0 ? stop tmra1 and clear it to 0. ta01mod 0 0 ? ? 0 1 ? ? select 8-bit timer mode and select t1 ( = (16/fc)s at f c = 40 mhz) as the input clock. ta1reg 0 1 1 0 0 1 0 0 set ta1reg to 40 s t1 = 100 = 64h inteta01 x 1 0 1 ? ? ? ? enable intta1 and set it to level 5. ta01run ? x x x ? 11 ? start tmra1 counting. x: don?t care, ? : no change select the input clock using 4h table 3.7.3 table 3.7.3 selecting interrupt interval and the input clock using 8-bit timer input clock interrupt interval (at f sys = 20 mhz) resolution t1 (8/f sys ) t4 (32/f sys ) t16 (128/f sys ) t256 (2048/f sys ) 0.4 s to 102.4 s 1.6 s to 409.6 s 6.4 s to 1.638 ms 102.4 s to 26.21 ms 0.4 s 1.6 s 6.4 s 102.4 s note: the input clocks for tmra0 and tmra1 differ as follows: tmra0: uses tmra0 input (ta0in) and can be selected from t1, t4, or t16 tmra1: match output of tmra0 (t a0trg) and can be selected from t1, t16, t256
tmp92c820 2007-02-16 92c820-129 2. generating a 50% duty ratio square wave pulse the state of the timer flip-flop (ta1ff1) is inverted at constant intervals and its status output via the timer output pin (ta1out). example: to output a 2.4 s square wave pulse from the ta1out pin at f c = 40 mhz, use the following procedure to make the appropriate register settings. this example uses timer 1; however, either timer 0 or timer 1 may be used. 7 6 5 4 3 210 ta01run ? x x x ? ? 0 ? stop tmra1 and clear it to 0. ta01mod 0 0 ? ? 0 1 ? ? select 8-bit timer mode and select t1 ( = (16/fc)s at f c = 40 mhz) as the input clock. ta1reg 0 0 0 0 0 0 1 1 set the timer register to 2.4 s t1 2 = 3 ta1ffcr x x x x 1 0 1 1 clear ta1ff to 0 and set it to invert on the match detect signal from timer 1. pccr x ? ? x ? x1 ? pcfc x ? ? x ? x1 ? set pc1 to function as the ta1out pin. ta01run ? x x x ? 11 ? start tmra1 counting. x: don?t care, ? : no change figure 3.7.10 square wave output timing chart (50% duty) 1.2 s at f c = 40 mhz 0 1 2 3 0 1 2 3 0 1 2 3 0 t1 ta01run bit7 to 2 bit1 bit0 intta1 ta1ff ta1out up counte r comparato r timing comparator output (match detect) uc1 clea r
tmp92c820 2007-02-16 92c820-130 3. making tmra1 count up on the match signal from the tmra0 comparator select 8-bit timer mode and set the comp arator output from tmra0 to be the input clock to tmra1. figure 3.7.11 tmra1 count up on signal from tmra0 (2) 16-bit timer mode a 16-bit interval timer is configured by pairing the two 8-bit timers tmra0 and tmra1. to make a 16-bit interval time r in which tmra0 and tmra1 are cascaded together, set ta01mod to 01. in 16-bit timer mode, the overflow output from tmra0 is used as the input clock for tmra1, regardless of the value set in ta01mod. 5h table 3.7.4 shows the relationship between the timer (interrupt) cycle and the input clock selection. to set the timer interrupt interval, set the lower eight bits in timer register ta0reg and the upper eight bits in ta1reg. be sure to set ta0reg first (as entering data in ta0reg temporarily disables the compare, while entering data in ta1reg starts the compare). example: to generate an intta1 interrupt every 0.4 s at f c = 40 mhz, set the timer registers ta0reg and ta1reg as follows: if t16 ( = (256/fc)s at f sys = 20 mhz) is used as the input clock for counting, set the following value in the registers: 0.4 s = (256/fc)s = 62500 = f424h; e.g., set ta1reg to f4h and ta0reg to 24h. 2 345 1 2345 12 3 1 1 2 1 comparator output (timer 0 match) timer 0 up counte r ( when ta0reg = 5 ) timer 1 up counte r ( when ta1reg = 2 ) timer 1 match out p ut
tmp92c820 2007-02-16 92c820-131 the comparator match signal is output from tmra0 each time the up counter uc0 matches ta0reg, though the up counter uc0 is not be cleared. in the case of the tmra1 comparator, the match detect signal is output on each comparator pulse on which the values in the up counter uc1 and ta1reg match. when the match detect signal is output simultaneously from both the comparator tmra0 and tmra1, the up counters uc0 and uc1 are cleared to 0 and the interrupt intta1 is generated. also, if inversion is enabled, the value of the timer flip-flop ta1ff is inverted. example: when ta1reg = 04h and ta0reg = 80h figure 3.7.12 timer output by 16-bit timer mode (3) 8-bit ppg (programmable pulse generation) output mode square wave pulses can be generated at any frequency and duty ratio by tmra0. the output pulses may be active low or ac tive high. in this mode tmra1 cannot be used. tmra0 outputs pulses on the ta1out pin (which can also be used as pc1). figure 3.7.13 8-bit ppg output waveforms inversion value of up counte r (uc1, uc0) tmra0 comparator match detect signal interru p t intta1 0080h 0180h 0280h 0380h 0480h timer out p ut ta1out tmra1 comparator match detect signal interru p t intta0 0080h t ta0reg ta1reg example: = ?01? ta0reg and uc0 match (interrupt intta0) ta1reg and uc0 match ( interru p t intta1 ) ta1out t h t l = ?10? t t l t h = ?01?
tmp92c820 2007-02-16 92c820-132 in this mode a programmable square wave is generated by inverting the timer output each time the 8-bit up counter (uc0) matches the value in one of the timer registers ta0reg or ta1reg. the value set in ta0reg must be smaller than the value set in ta1reg. although the up counter for tmra1 (uc1) is not used in this mode, ta01run should be set to ?1? so that uc1 is set for counting. 6h figure 3.7.14 shows a block diagram representing this mode. figure 3.7.14 block diagram of 8-bit ppg output mode if the ta0reg double buffer is enabled in this mode, the value of the register buffer will be shifted into ta0reg each time ta1reg matches uc0. use of the double buffer facilitates the ha ndling of low duty waves (when duty is varied). figure 3.7.15 operation of register buffer q 2 q 1 match with ta0reg and u p counte r match with ta1reg q 3 q 2 (up counter = q 1 ) (up countner = q 2 ) shift from register buffer ta0reg (register buffer) write ta0reg (value to be compared) re g ister buffe r 8-bit up counter (uc0) comparator comparator ta0in t1 t4 t16 ta01mod ta1ff ta0reg register buffer ta1reg ta01run ta0reg-wr ta01run ta1out ta1ffcr intta0 intta1 shift trigger internal data bus selecto r inversion selecto r
tmp92c820 2007-02-16 92c820-133 example: to generate 1/4 duty 62.5 khz pulses (at f c = 40 mhz): calculate the value which should be set in the timer register. to obtain a frequency of 62.5 khz, the pulse cycle t should be: t = 1/62.5 khz = 16 s t1 ( = (16/fc)) (at f c = 40 mhz); 16 s (16/fc)s = 40 therefore set ta1reg to 40 (28h) the duty is to be set to 1/4: t 1/4 = 16 s 1/4 = 4 s 4 s (16/fc)s = 10 therefore, set ta0reg = 10 = 0ah. 7 6 5 4 3 210 ta01run 0 x x x ? 0 0 0 stop tmra0 and tmra1 and clear it to ?0?. ta01mod 1 0 ? ? ? ? 0 1 set the 8-bit ppg mode, and select t1 as input clock. ta0reg 0 0 0 0 1 0 1 0 write 0ah ta1reg 0 0 1 0 1 0 0 0 write 28h ta1ffcr x x x x 0 1 1 ? set ta1ff, enabling both inversion and the double buffer. 10 generates a negative logic pulse. pccr x ? ? x ? x1 ? pcfc x ? ? x ? x1 ? set pc1 as the ta1out pin. ta01run 1 x x x ? 1 1 1 start tmra0 and tmra1 counting. x: don?t care, ? : no change 16 s
tmp92c820 2007-02-16 92c820-134 (4) 8-bit pwm output mode this mode is only valid for tmra0. in this mode, a pwm pulse with the maximum resolution of 8 bits can be output. when tmra0 is used the pwm pulse is output on the ta1out pin (which is also used as pc1). tmra1 can also be used as an 8-bit timer. the timer output is inverted when the up counter (uc0) matches the value set in the timer register ta0reg or when 2 n counter overflow occurs (n = 6, 7 or 8 as specified by ta01mod). the up counter uc0 is cleared when 2 n counter overflow occurs. the following conditions must be satisfied before this pwm mode can be used. value set in ta0reg < value set for 2 n counter overflow value set in ta0reg 0 figure 3.7.16 8-bit pwm waveforms 7h figure 3.7.17 shows a block diagram representing this mode. figure 3.7.17 block diagram of 8-bit pwm mode ta0reg and uc0 match ta1out t pwm (pwm cycle) 2 n overflow (intta0 interrupt) selector 8-bit up counter (uc0) comparator ta01mod taff1 ta0reg register buffer selector ta01run ta0reg-wr ta01run ta1out ta1ffcr shift trigger internal data bus clear 2 n overflow control intta0 ta01mod overflow invert ta0in t1 t4 t16
tmp92c820 2007-02-16 92c820-135 in this mode the value of the register buffer will be shifted into ta0reg if 2 n overflow is detected when the ta0reg double buffer is enabled. use of the double buffer facilitates th e handling of low duty ratio waves. figure 3.7.18 register buffer operation example: to output the following pwm waves on the ta1out pin at f c = 40 mhz: to achieve a 51.2 s pwm cycle by setting t1 to 0.4 s (at f c = 40 mhz): 51.2 s (16/fc)s = 128 2 n = 128 therefore n should be set to 7. since the low-level period is 36.0 s when t1 = (16/fc) s, set the following value for treg0: 36.0 s (16/fc)s = 90 = 5ah msb lsb 7 6 5 4 3 210 ta01run ? x x x ? ? ? 0 stop tmra0 and clear it to 0. ta01mod 1 1 1 0 ? ? 0 1 select 8-bit pwm mode (cycle: 2 7 ) and select t1 as the input clock. ta0reg 0 1 0 1 1 0 1 0 write 5ah. ta1ffcr x x x x 1 0 1 ? clear ta1ff to 0, enable the inversion and double buffer. pccr x ? ? x ? x1 ? pcfc x ? ? x ? x1 ? set pc1 and the ta1out pin. ta01run 1 x x x ? 1 ? 1 start tmra0 counting. x: don?t care, ? : no change q 2 q 1 match with ta0reg q 3 q 2 up counter = q 1 up counter = q 2 shift into ta0reg ta0reg (register buffer) write ta0reg ( value to be com p ared ) re g ister buffe r 2 n overflow 36.0 s 51.2 s
tmp92c820 2007-02-16 92c820-136 table 3.7.4 pwm cycle pwm cycle taxxmod 2 6 (x64) 2 7 (x128) 2 8 (x256) taxxmod taxxmod taxxmod clock gear syscr1 system clock syscr0 ? t1(x2) t4(x8) t16(x32) t1(x2) t4(x8) t16(x32) t1(x2) t4(x8) t16(x32) ? 1(fs) 1024/fs 4096/fs 16384/fs 2048/fs 8192/ fs 32768/fs 4096/fs 16384/fs 65536/fs 000(x1) 1024/fc 4096/fc 16384/fc 2048/fc 8192/ fc 32768/fc 4096/fc 16384/fc 65536/fc 001(x2) 2048/fc 8192/fc 32768/fc 4096/fc 16384 /fc 65536/fc 8192/fc 32768/fc 131072/fc 010(x4) 4096/fc 16384/fc 65536/fc 8192/fc 32768 /fc 131072/fc 16384/fc 65536/fc 262144/fc 011(x8) 8192/fc 32768/fc 131072/fc 16384/fc 65536/fc 262144/fc 32768/fc 131072/fc 524288/fc 100(x16) 0(fc) 8 16384/fc 65536/fc 262144/fc 32768/fc 131072/fc 524288/fc 65536/fc 262144/fc 1048576/fc (5) mode setting 8h table 3.7.5 shows the sfr settings for each mode. table 3.7.5 timer mode setting registers register name ta01mod ta1ffcr function timer mode pwm cycle upper timer input clock lower timer input clock timer f/f invert signal select 8-bit timer 2 channels 00 ? lower timer match, t1, t16, t256 (00, 01, 10, 11) external clock, t1, t4, t16 (00, 01, 10, 11) 0: lower timer output 1: upper timer output 16-bit timer mode 01 ? ? external clock, t1, t4, t16 (00, 01, 10, 11) ? 8-bit ppg 1 channel 10 ? ? external clock, t1, t4, t16 (00, 01, 10, 11) ? 8-bit pwm 1 channel 11 2 6 , 2 7 , 2 8 (01, 10, 11) ? external clock, t1, t4, t16 (00, 01, 10, 11) ? 8-bit timer 1 channel 11 ? t1, t16, t256 (01, 10, 11) ? output disabled ? : don?t care
tmp92c820 2007-02-16 92c820-137 3.8 external memory extension function (mmu) this is mmu function which can expand program/ data area to 136 mbytes by having 4 local area. address pins to external memory are 2 exte nded address bus pins (ea24, ea25) and 8 extended chip select pins ( cs2a to cs2g and csexa ) in addition to 24 address bus pins (a0 to a23) which are common specification of tlcs-900/h1 and 4 chip select pins ( cs0 to cs3 ) output from memc. the feature and the recommendation setting method of two types are shown below. in addition, ah in the table is the value which number address 23 to 16 displayed as hex. purpose item for standard extended memory for many kinds class extended memory maximum memory size 2 mbytes: common2 + 14 mbytes: bank (16 mbytes 1 pcs) used local area, bank number local2 (ah = c0 to df: 2 mbytes 7 bank) setting memc setup ah = ?80 to ff? to cs2 program rom used cs pin cs2a maximum memory size 96 mbytes (16 mbytes 6 pcs) used local area, bank number local3 (ah = 80 to bf: 4 mbytes 24 bank) setting memc setup ah = ?80 to ff? to cs2 data rom used cs pin cs2b , cs2c , cs2d , cs2e , cs2f , cs2g maximum memory size 2 mbytes: common1 + 14 mbytes: bank (16 mbytes 1 pcs) used local area, bank number local1 (ah = 40 to 5f: 2 mbytes 7 bank) setting memc setup ah = ?40 to 7f? to cs1 data sdram * used cs pin cs1 maximum memory size 1 mbyte: common0 + 7 mbytes: bank (8 mbytes 1 pcs) used local area, bank number local0 (ah = 10 to 1f: 1 mbyte 7 bank) setting memc setup ah = ?00 to 1f? to cs3 data ram used cs pin cs3 maximum memory size 1 mbyte (1 mbyte 1 pcs) used local area, bank number none setting memc setup ah = ?20 to 2f? to cs0 extended memory 1 used cs pin cs0 maximum memory size 256 kbytes (256 kbytes 1 pcs) used local area, bank number none setting memc setup ah = ?30 to 3f? to csex extended memory 2 used cs pin csexa maximum memory size 256 kbytes (64 kbytes 4 pcs) used local area, bank number none setting memc setup ah = ?30 to 3f? to csex extended memory 3 (direct address assigned built-in type lcd driver) used cs pin d1bscp, d2blp, d3bfr, dlebcd maximum memory size 512 kbytes used local area, bank number none setting memc setup ah = ?30 to 3f? to csex extended memory 4 used cs pin none * note: sdram must be mapped in local1 area. it can?t use other area.
tmp92c820 2007-02-16 92c820-138 3.8.1 recommendable memory map the recommendation logic address memory map at the time of variety extension memory correspondence is shown in 0h figure 3.8.1. and, a physical-address map is shown in 1h figure 3.8.2. however, when memory area is less than 16 mb ytes and is not expanded, please refer to section of memc. setting of regi ster in mmu is not necessary. since it is being fixed, the address of a local-area cannot be changed. when sdram is used, must locate to local1 area. figure 3.8.1 logical address map 256 bytes 64 kbytes 64 kbytes 512 kbytes 1 mbyte 1 mbyte common0 local0 local1 common1 local3 local2 common2 vector area 1 mbyte 256 kbytes 64 kbytes 64 kbytes 2 mbytes 2 mbytes 4 mbytes 2 mbytes 2 mbytes 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 22 23 0 1 2 3 4 5 6 7 000000h 100000h 200000h 300000h 380000h 3c0000h 3d0000h 3e0000h 3f0000h 400000h 600000h 800000h c00000h e00000h ffff00h ffffffh a ddress size memory map bank cs3 cs0 csex csex csex csex csex csex cs1 cs2 cs2 cs/wait cs pin cs3 cs0 to csexa d1bscp d2blp d3bfr dlebcd cs1 cs2b (bank0 to bank3) cs2c (bank4 to bank7) cs2d (bank8 to bank11) cs2e (bank12 to bank15) cs2f (bank16 to bank19) cs2g (bank20 to bank23) cs2a : internal area : overlapped with common area
tmp92c820 2007-02-16 92c820-139 figure 3.8.2 physical address map bank3 bank2 bank0 bank1 bank0 bank1 bank2 bank3 bank4 bank5 bank6 bank7 bank0 bank1 bank2 bank3 bank4 bank5 bank6 bank7 bank0 bank1 bank2 bank3 bank4 bank5 bank6 bank7 bank15 bank14 bank12 bank13 000000h internal-i/o and ram 800000h 1000000h local0 cs3 for data ram (sdram non support) (8 mbytes) local1 cs1 for option program rom (sdram support) (16 mbytes) local2 cs2a for program rom (16 mbytes) local3 cs2b cs2e for data rom (16 mbytes 6) bank7 bank6 bank4 bank5 bank19 bank18 bank16 bank17 cs2f cs2c 1000000h 000000h reset and interrupt vector area bank11 bank10 bank8 bank9 bank23 bank22 bank20 bank21 cs2g cs2d 1000000h 000000h : internal area : overlapped with common area tmp92c820
tmp92c820 2007-02-16 92c820-140 3.8.2 block diagram figure 3.8.3 block diagram of mmu l0e l1e l2e l3e decoder ea22 to ea20 ea23 to ea21 ea23 to ea21 ea26 to ea22 selector a 23 to a20 cpu out address a23 to a8 local0 register local1 register local2 register local3 register internal data bus selector physical address va26 to va20 a23 to a16 physical address wa26 to wa7 (to external address bus pins) cpu out address a19 to a7 decoder cs2a cs2b cs2c cs2d cs2e cs2f cs2g csexa cpu out address a23 to a16 local3 area detect signal local3 register local3 area detect signal
tmp92c820 2007-02-16 92c820-141 3.8.3 control registers local0 register 7 6 5 4 3 2 1 0 bit symbol l0e l0ea22 l0ea21 l0ea20 read/write r/w r/w after reset 0 0 0 0 function use bank for local0 0: not use 1: use setting bank number for local0 local1 register 7 6 5 4 3 2 1 0 bit symbol l1e l1ea23 l1ea22 l1ea21 read/write r/w r/w after reset 0 0 0 0 function use bank for local1 0: not use 1: use setting bank number for local1 local2 register 7 6 5 4 3 2 1 0 bit symbol l2e l2ea23 l2ea22 l2ea21 read/write r/w r/w after reset 0 0 0 0 function use bank for local2 0: disable 1: enable setting bank number for local2 local3 register 7 6 5 4 3 2 1 0 bit symbol l3e l3ea26 l3ea25 l3ea24 l3ea23 l3ea22 read/write r/w r/w after reset 0 0 0 0 0 0 function use bank for local3 0: disable 1: enable 00000 to 00011 cs2b 00100 to 00111 cs2c 01000 to 01011 cs2d 01100 to 01111 cs2e 10000 to 10011 cs2f 10100 to 10111 cs2g 11000 to 11111: set prohibition figure 3.8.4 mmu control register local0 (01d0h) local1 (01d1h) local2 (01d2h) local3 (01d3h)
tmp92c820 2007-02-16 92c820-142 3.8.4 operational description setup bank value and bank use in bank setting register of each local area of local register in common area. moreover, in that case, a combination pin is set up and the memc simultaneously sets up mapping. when cpu outputs logical address of the local area, mmu outputs physical address to the outside pin according to value of bank setting register. access of external memory becomes possible therefore. common area located in each local area should be passed surely when changing bank. for example, when the program jump bank0 of local2 to bank6, please jump from bank0 to common2 once and afterwards jump to bank6. please do not use as bank that overlaps with another bank since this common area overlaps with either of eight banks of local area on the physical map. example program is as next page follows.
tmp92c820 2007-02-16 92c820-143 * in case of 16-bit bus memory, address connection is : cpu a1 = memory a0, cpu a2 = memory a1 * in case of 8-bit bus memory, address connection is : cpu a0 = memory a0, cpu a1 = memory a1 figure 3.8.5 h/w setting example at, 2h figure 3.8.5 it shows example of connection tmp92c820 and some memories: program rom: mrom, 16 mbytes, data rom: mrom, 64 mbytes, data ram of 8-bit bus: sram, 8 mbytes, display ram: sdram, 16 mbytes. in case of 16-bit bus memory connection, it needs to shift 1-bit address bus from tmp92c820 and 8-bit bus case, direct co nnection address bus from tmp92c820. in that figure, logical address and physical address are shown. and each memory allot each chip select signal, ram: cs0 , sdram: cs1 , program mrom: cs2 , data mrom: cs3 . in case of this example, as data mrom is 64 mbytes, this mrom connect to ea24 and ea25. initial condition after reset, because tmp92c820 access from cs2 area, cs2 area allots to program rom. it can set free setting except program rom. sram 8 mbytes 8 bits rd wrll , wrlu , wrul , wruu srllb , srlub , srulb , sruub : sram sdclk, sdcke sdlldqm, sdludqm, sduldrm, sduudqm sdcsl , sdcsh , sdras , sdcas , sdwe cs0 ea24, ea25 tmp92c820 cs1 cs3 cs2 mrom 16 mbytes 16 bits sdram 16 mbytes 16 bits mrom 64 mbytes 16 bits data address data/stack ram cs0 000000h~1fffffh (logical) 000000h~7fffffh (physical) display sdram cs1 400000h~7fffffh (logical) 000000h~ffffffh (physical) program rom cs2 c00000h~ffffffh (logical) 000000h~ffffffh (physical) data rom cs3 800000h~bfffffh (logical) 000000h~3fffffh (physical)
tmp92c820 2007-02-16 92c820-144 ; initial setting ; cs0 ld (msar0), 00h ; logical address area: 000000h to 1fffffh ld (mamr0), ffh ; logical address size: 2 mbytes ld (b0csl), 22h ; condition: wr 3 st ates (1 wait), rd 3 states (1 wait) ld (b0csh), 80h ; sram, 8 bits ; cs1 ld (msar1), 40h ; logical address area: 400000h to 7fffffh ld (mamr1), ffh ; logical address size: 4 mbytes ld (b1csl), 11h ; condition: wr 2 states (0 waits) rd 2 states (0 waits) ld (b1csh), 8dh ; condition: sdram, 16 bits ; cs2 ld (msar2),c0h ; logical address area: c00000h to ffffffh ld (mamr2), 7fh ; logical address size: 4 mbytes ld (b2csl), 11h ; condition: wr 2 states (0 waits) rd 2 states (0 waits) ld (b2csh), 0c1h ; condition: rom, 16 bits ; cs3 ld (msar3), 80h ; logical address area: 800000h to bfffffh ld (mamr3), 7fh ; logical address size: 4 mbytes ld (b3csl), 66h ; condition: wr 5 states (3 waits), rd 5 states (3 waits) ld (b3csh), 81h ; condition: rom,16 bits ; csx ld (bexcsl), 11h ; condition: wr 2 stat es (0 waits), rd 2 states (0 waits) ld (bexcsh), 01h ; condition: 16 bits ; port ld (p8fc), 3fh ; cs0 to cs3 , ea24, ea25: port 8 setting ld (p8fc2), 02h ; cs1 sdcsl setting ~ ldw (p7cr), 1f1fh ; wruu , wrul , wrlu , wrll , rd ld (pjfc), 0ffh ; pj<7:0> = sdram control ld (sdacr), 083h ; add-mux sele ct type b, sdram, auto init enable ~ sdram setup time ld (sdrcr), 01h ; interval refresh figure 3.8.6 bank o peration s/w example 1 secondly, it shows example of initial setting at 3h figure 3.8.6. because cs0 connect to ram: 8-bit bus, 8 mbytes, it need to set 8-bit bus. at this example, it set 3 states setting. in the same way cs1 set to 16-bit bus and 2 states, cs2 set 16-bit bus and 2 states, cs3 set 16-bit bus and 5 states. by memc controller, each chip selection sign al?s memory size, don?t set actual connect memory size, need to set that logical address size: fitting to each local area. actual physical address is set by each area ?s bank register setting. csex setting of memc is except above cs0 to cs3?s setting. this program example isn?t used csex setting. finally pin condition is set. ports 80 to 85 set to cs0 , cs1 , cs2 , cs3 , ea24, ea25, and sdram condition.
tmp92c820 2007-02-16 92c820-145 ; bank operation ; ***** cs2 ***** org 000000h ; program rom: start address at bank0 of local2 org 200000h ; program rom: start address at bank1 of local2 org 400000h ; program rom: start address at bank2 of local2 org 600000h ; program rom: start address at bank3 of local2 org 800000h ; program rom: start address at bank4 of local2 org a00000h ; program rom: start address at bank5 of local2 org c00000h ; program rom: start address at bank6 of local2 org e00000h ; program rom: start address at bank7 ( = common2) of local2 ; logical address e00000h to ffffffh ; physical address 0e00000h to 0ffffffh ld (local3), 85h ; local3 bank5 set 14xxxxh ldw hl, (800000h) ; load data (5555h) form bank5 (140000h: physical address) of local3 ( cs3 ) ld (local3), 88h ; local3 bank8 set 20xxxxh ldw bc, (800000h) ; load data (aaaah) form bank8 (200000h: physical address) of local3 ( cs3 ) ~ org ffffffh ; program rom: end address at bank7 ( = common2) of local2 ; ***** cs3 ***** org 0000000h ; data rom: start address at bank0 of local3 org 0400000h ; data rom: start address at bank1 of local3 org 0800000h ; data rom: start address at bank2 of local3 org 0c00000h ; data rom: start address at bank3 of local3 org 1000000h ; data rom: start address at bank4 of local3 org 1400000h ; data rom: start address at bank5 of local3 dw 5555h ~ org 1800000h ; data rom: start address at bank6 of local3 org 1c00000h ; data rom: start address at bank7 of local3 org 2000000h ; data rom: start address at bank8 of local3 dw aaaah ~ org 2400000h ; data rom: start address at bank9 of local3 org 2800000h ; data rom: start address at bank10 of local3 org 2c00000h ; data rom: start address at bank11 of local3 org 3000000h ; data rom: start address at bank12 of local3 org 3400000h ; data rom: start address at bank13 of local3 org 3800000h ; data rom: start address at bank14 of local3 org 3c00000h ; data rom: start address at bank15 of local3 org 3ffffffh ; data rom: end address at bank15 of local3 figure 3.8.7 bank o peration s/w example 2 here shows example of data access between one bank and other bank. 4h figure 3.8.7 is one software example. a dot line square area shows one memory and each dot line square shows cs2 ?s program rom and cs3 ?s data rom. program start from e00000h address, firstly, write to bank register of local3 area upper 5-bit address of access point. in case of this example, because most upper address bit of physical address is ea25, most upper address bit of bank register is meaningl ess. 4 bits of upper 5 bits address means 16 banks. after setting bank5, accessing 800 000h to bfffffh address: logical local3 address, actually access to physical 1400000h to 1700000h address.
tmp92c820 2007-02-16 92c820-146 ; bank operation ; ***** cs2 ***** org 000000h ; program rom: start address at bank0 of local2 org 200000h ; program rom: start address at bank1 of local2 nop ; operation at bank1 of local2 ~ jp e00100h ; jump to bank7 ( = common2) of local2 org 400000h ; program rom: start address at bank2 of local2 org 600000h ; program rom: start address at bank3 of local2 nop ; operation at bank3 of local2 ~ jp e00200h ; jump to bank7 ( = common2) of local2 org 800000h ; program rom: start address at bank4 of local2 org a00000h ; program rom: start address at bank5 of local2 org c00000h ; program rom: start address at bank6 of local2 !!!! program start !!!! org e00000h ; program rom: start address at bank7 ( = common2) of local2 ; logical address e00000h to ffffffh ; physical address 0e00000h to 0ffffffh ld (local2), 81h ; local2 bank1 set 20xxxxh jp c00000h ; jump to bank1 (200000h: physical address) of local2 ~ org e00100h ld (local2), 83h ; local2 bank3 set 60xxxxh jp c00000h ; jump to bank3 (600000h: physical address) of local2 ~ org e00200h ld (local1), 00h ; disable bank! ~ ; lcd display set ld (lsarch), 60h ; c_area start address ld (lsarcm), 00h ; c_area start address ld (lsarcl), 00h ; c_area start address set 0, (lctctl) ; lcd display start org ffffffh ; program rom: end address at bank7 ( = common2) of local2 ; ***** cs1 ***** org 000000h ; sdram: start address at bank0 of local1 org 200000h ; sdram: start address at bank1 of local1 org 400000h ; sdram: start address at bank2 of local1 org 600000h ; sdram: start address at bank3 ( = common1) of local1 dl 01234567h ; display data ~ org 800000h ; sdram: start address at bank4 of local1 org a00000h ; sdram: start address at bank5 of local1 org c00000 ; sdram: start address at bank6 of local1 org e00000h ; sdram: star t address at bank7 of local1 org ffffffh ; sdram: end address at bank7 of local1 figure 3.8.8 bank o peration s/w example 3
tmp92c820 2007-02-16 92c820-147 at 5h figure 3.8.8, it shows example of program jump. in the same way with before example, two dot line squares show each cs2 ?s program rom and cs1 ?s (sdcs) sdram. program start from e00000h common address, firstly, write to bank register of local2 area upper 3-bit address of jumping point. after setting bank1, jumpin g c00000h to dfffffh address: logical local2 address, actually jump to physical 200000h to 3fffffh address. when return to common area, it can only jump to e00000h to ffffffh withou t writing to bank re gister of local2 area. by a way of setting of bank register, the setting that bank address and common address conflict with is possi ble. when two kinds or more logical addresses to show common area exist, management of bank is confused. we recommends not to use the bank setting, bank address and common address conflict with. please set similarly when jumping through cs . after setting bank4, jumping 400000h to 5 fffffh address: logi cal local area of cs1 , actually jump to physical 800000h to 9fffffh address. when using lcd display data for sdram, we recommend setting display area to common area in sdram. because of, lcd displays dma occurs at synchronous less. if sdram bank is change; you don?t need to care only common area. it is a mark paid attention to here, it needs to go by way of common area by all means when moves from a bank to a bank. in other words, it must write to bank register only in common area and it prohibits writing the bank registers in bank area. if it modify the bank register?s data in bank area, program run away. please do no t set bank function of mmu as display ram. this is because reading lcdc display data is not controlled by the cpu. therefore if bank of display area is changed during lcd displaying, it cannot display. it is recommended to allocate disp lay data to a common area.
tmp92c820 2007-02-16 92c820-148 3.9 serial channels (sio) the tmp92c820 includes three serial i/o channels. for each channel either uart mode (asynchronous transmission) or i/o interface mode (synchronous transmi ssion) can be selected. (channel 2 can be selected only uart mode.) ? i/o interface mode mode 0: for transmitting and receiving i/o data using the synchronizing signal sclk for extending i/o. mode 1: 7-bit data ? uart mode mode 2: 8-bit data mode 3: 9-bit data in mode 1 and mode 2 a parity bit can be added. mode 3 has a wakeup function for making the master controller start slav e controllers via a serial link (multi-controller system). 0h figure 3.9.2, 1h figure 3.9.3, and 2h figure 3.9.4 are block diagrams for each channel. each channel can be used independently. each channel operates in the same fashion except for the following points; hence only the operation of channel 0 is explained below. table 3.9.1 differences between channels 0 to 2 channel 0 channel 1 channel 2 pin name txd0 (pf0) rxd0 (pf1) 0 cts /sclk0 (pf2) txd1 (pf3) rxd1 (pf4) 1 cts /sclk1 (pf5) txd2 (p95) rxd2 (p96) irda mode yes no no this chapter contains the following sections: 3h 3.9.1 4h block diagrams 5h 3.9.2 6h operation for each circuit 7h 3.9.3 8h sfrs 9h 3.9.4 10h operation in each mode 11h 3.9.5 12h support for irda
tmp92c820 2007-02-16 92c820-149 figure 3.9.1 data formats stop bit0 1 2 3 4 5 6 7 bit0 1 2 3 4 5 6stop start bit0 1 2 3 4 5 parity stop start 6 bit0 1 2 3 4 5 7stop start bit0 1 2 3 4 5 parity stop start 7 6 6 bit0 1 2 3 4 5 8 stop start bit0 1 2 3 4 5 start bit8 6 6 7 7 transfer direction ? mode 0 (i/o interface mode) ? mode 1 (7-bit uart mode) no parity parity no parity parity ? mode 2 (8-bit uart mode) ? mode 3 (9-bit uart mode) when bit8 = 1, address (select code) is denoted. when bit8 = 0, data is denoted. wakeup
tmp92c820 2007-02-16 92c820-150 3.9.1 block diagrams figure 3.9.2 block diagram of serial channel 0 selector t0 t2 t8 t32 sc0mod0 receive buffer 1 (shift register) rxdclk sc0mod0 prescaler selector ta0trg (from tmra0) uart mode br0cr baud rate generator selector sc0mod0 selector 2 i/o interface mode sc0cr receive counter (uart only 16) transmision counter (uart only 16) receive control transmission control intrx0 inttx0 receive buffer 2 (sc0buf) rb8 error flag sc0cr serial channel interrupt control tb8 cts0 (shared with pf2) txd0 (shared with pf0) transmission buffer (sc0buf) rxd0 (shared with pf1) txdclk sc0mod0 f io sc0mod0 sclk0 out (shared with pf2) sclk0 in (shared with pf2) sioclk internal data bus parity control sc0cr serial clock generation circuit br0cr br0add br0cr i/o interface mode t0 2 64 4 8 16 32 prescale r t2 t8 t32 int request
tmp92c820 2007-02-16 92c820-151 figure 3.9.3 block diagram of serial channel 1 selector t0 t2 t8 t32 sc1mod0 receive buffer 1 (shift register) rxdclk sc1mod0 prescaler selector ta0trg (from tmra0) uart mode br1cr baud rate generator selector sc1mod0 selector 2 i/o interface mode sc1cr receive counter (uart only 16) transmision counter (uart only 16) receive control transmission control intrx1 inttx1 receive buffer 2 (sc1buf) rb8 error flag sc1cr serial channel interrupt control tb8 cts1 (shared with pf5) txd1 (shared with pf3) transmission buffer (sc1buf) rxd1 (shared with pf4) txdclk sc1mod0 f io sc1mod0 sclk1 out (shared with pf5) sclk1 in (shared with pf5) sioclk internal data bus parity control sc1cr serial clock generation circuit br1cr br1add br1cr i/o interface mode t0 2 64 4 8 16 32 prescale r t2 t8 t32 int request
tmp92c820 2007-02-16 92c820-152 figure 3.9.4 block diagram of serial channel 2 selector t0 t2 t8 t32 sc2mod0 receive buffer 1 (shift register) rxdclk prescaler selector ta0trg (from tmra0) uart mode br2cr baud rate generator selector sc2mod0 selector 2 i/o interface mode sc2cr receive counter (uart only 16) transmision counter (uart only 16) receive control transmission control intrx2 inttx2 receive buffer 2 (sc2buf) rb8 error flag sc2cr serial channel interrupt control tb8 txd2 (shared with p95) transmission buffer (sc2buf) rxd2 (shared with p96) txdclk sc2mod0 f io sc2mod0 sclk1 in (shared with pf5) sioclk internal data bus parity control sc2cr serial clock generation circuit br2cr br2add br2cr t0 2 64 4 8 16 32 prescale r t2 t8 t32 int request
tmp92c820 2007-02-16 92c820-153 3.9.2 operation for each circuit (1) prescaler, prescaler clock select there is a 6-bit prescaler for waking serial clock. the prescaler can be run by selecting the baud rate generator as the waking serial clock. 13h table 3.9.2 shows prescaler clock resolu tion into the baud rate generator. table 3.9.2 prescaler clock resolution to baud rate generator baud rate generator input clock sio prescaler br0cr ? clock gear selection syscr1 ? t0 t2(1/4) t8(1/16) t32(1/64) 000(1/1) fc/8 fc/32 fc/128 fc/512 001(1/2) fc/16 fc/64 fc/256 fc/1024 010(1/4) fc/32 fc/128 fc/512 fc/2048 011(1/8) fc/64 fc/256 fc/1024 fc/4096 fc 100(1/16) 1/8 fc/128 fc/512 fc/2048 fc/8192 the baud rate generator sele cts between 4 clock inputs: t0, t2, t8, and t32 among the prescaler outputs.
tmp92c820 2007-02-16 92c820-154 (2) baud rate generator the baud rate generator is a circuit which generates transmission and receiving clocks that determine the transfer rate of the serial channels. the input clock to the baud rate generator, t0, t2, t8, or t32, is generated by the 6-bit prescaler which is shared by the timers. one of these input clocks is selected using the br0cr field in the baud rate generator control register. the baud rate generator includes a frequenc y divider, which divides the frequency by 1 or n + (16 ? k)/16 or 16 values, thereby determining the transfer rate. the transfer rate is determined by th e settings of br0cr and br0add. ? in uart mode (1) when br0cr = 0 the settings br0add are ignored. the baud rate generator divides the selected prescaler clock by n, which is set in br0ck. (n = 1, 2, 3?16) (2) when br0cr = 1 the n + (16 ? k)/16 division function is enabled. the baud rate generator divides the selected prescaler clock by n + (16 ? k)/16 using the value of n set in br0cr (n = 2, 3?15) and the value of k set in br0add (k = 1, 2, 3?5) note: if n = 1 or n = 16, the n + (16 ? k)/16 division function is disabled. set br0cr to 0. ? in i/o interface mode the n + (16 ? k)/16 division function is not available in i/o interface mode. set br0cr to 0 before dividing by n. the method for calculating the transfer rate when the baud rate generator is used is explained below. ? in uart mode input clock of baud rate generator baud rate = frequency divider for baud rate generator 16 ? in i/o interface mode input clock of baud rate generator baud rate = frequency divider for baud rate generator 2
tmp92c820 2007-02-16 92c820-155 ? integer divider (n divider) for example, when the source clock frequency (f c ) is 39.3216 mhz, the input clock is t2 (f c /32), the frequency divider n (br0cr) = 8, and br0cr = 0, the baud rate in uart mode is as follows: * clock state clock gear : 1/1 (f c ) f c /32 baud rate = 8 16 = 39.3216 10 6 16 8 16 = 9600 (bps) note: the n + (16 ? k)/16 division function is disabled and setting br0add is invalid. ? n + (16 ? k)/16 divider (uart mode only) accordingly, when the source clock frequency (f c ) = 31.9488 mhz, the input clock is t2 (f c /32), the frequency divider n (br0cr) = 6, k (br0add) = 8, and br0cr = 1, the baud rate in uart mode is as follows: * clock state clock gear : 1/1 (f c ) f c /32 (16 ? 8) baud rate = 6 + 16 16 8 = 31.9488 10 6 16 (6 + 16 ) 16 = 9600 (bps) 14h table 3.9.3 show examples of uart mode transfer rates. additionally, the external clock input is available in the serial clock (serial channels 0 and 1). the method for calculating the baud rate is explained below: ? in uart mode baud rate = external clock input frequency 16 it is necessary to satisfy (external clock input cycle) 4/f sys ? in i/o interface mode baud rate = external clock input frequency it is necessary to satisfy (external clock input cycle) 16/f sys
tmp92c820 2007-02-16 92c820-156 table 3.9.3 selection of transfer rate (1) (when baud rate generator is used and br0cr = 0) unit (kbps) f sys [mhz] input clock frequency divider t0 (f sys /4) t2 (f sys /16) t8 (f sys /64) t32 (f sys /256) 9.8304 2 76.800 19.200 4.800 1.200 4 38.400 9.600 2.400 0.600 8 19.200 4.800 1.200 0.300 10 9.600 2.400 0.600 0.150 12.2880 5 38.400 9.600 2.400 0.600 a 19.200 4.800 1.200 0.300 14.7456 2 115.200 28.800 7.200 1.800 3 76.800 19.200 4.800 1.200 6 38.400 9.600 2.400 0.600 c 19.200 4.800 1.200 0.300 19.6608 1 307.200 76.800 19.200 4.800 2 153.600 38.400 9.600 2.400 4 76.800 19.200 4.800 1.200 8 38.400 9.600 2.400 0.600 10 19.200 4.800 1.200 0.300 22.1184 3 115.200 28.800 7.200 1.800 24.5760 1 384.000 96.000 24.000 6.000 2 192.000 48.000 12.000 3.000 4 96.000 24.000 6.000 1.500 5 76.800 19.200 4.800 1.200 8 48.000 12.000 3.000 0.750 a 38.400 9.600 2.400 0.600 10 24.000 6.000 1.500 0.375 note: transfer rates in i/o interface mode are ei ght times faster than the values given above. in uart mode, tmra match detect sign al (ta0trg) can be used for serial transfer clock. method for calculating the timer output frequency which is needed when outputting trigger of timer ta0trg frequency = baud rate 16 note: the tmra0 match detect signal cannot be used as the transfer clock in i/o interface mode.
tmp92c820 2007-02-16 92c820-157 (3) serial clock generation circuit this circuit generates the basic clock for transmitting and receiving data. ? in i/o interface mode in sclk output mode with the setting sc0cr = 0, the basic clock is generated by dividing the output of the baud rate generator by 2, as described previously. in sclk input mode with the setting sc0cr = 1, the rising edge or falling edge will be detected according to the setting of the sc0cr< sclks> register to generate the basic clock. ? in uart mode the sc0mod0 setting determines whether the baud rate generator clock, the internal clock f io , the match detect signal from timer tmra0 or the external clock (sclk0) is used to generate the basic clock sioclk. (4) receiving counter the receiving counter is a 4-bit binary counter used in uart mode, which counts up the pulses of the sioclk clock. it takes 16 sioclk pulses to receive 1 bit of data; each data bit is sampled three times?on the 7th, 8th, and 9th clock cycles. the value of the data bit is determined from these three samples using the majority rule. for example, if the data bit is sampled resp ectively as 1, 0 and 1 on 7th, 8th and 9th clock cycles, the received data bit is taken to be 1. a data bit sampled as 0, 0 and 1 is taken to be 0. (5) receiving control ? in i/o interface mode in sclk output mode with the setting sc0cr = 0, the rxd0 signal is sampled on the rising or falling edge of the shift clock which is output on the sclk0 pin, according to th e sc0cr setting. in sclk input mode with the setting sc0cr = 1, the rxd0 signal is sampled on the rising or falling edge of the sclk0 input, according to the sc0cr setting. ? in uart mode the receiving control block has a circuit, which detects a start bit using the majority rule. received bits are sampled three times; when two or more out of three samples are 0, the bit is recognized as the start bit and the receiving operation commences. the values of the data bits that are received are also determined using the majority rule.
tmp92c820 2007-02-16 92c820-158 (6) the receiving buffers to prevent overrun errors, the receiving buffers are arranged in a double-buffer structure. received data is stored one bit at a time in receiving buffer 1 (which is a shift register). when 7 or 8 bits of data have been stored in receiving buffer 1, the stored data is transferred to receiving buffer 2 (sc0buf); this causes an intrx0 interrupt to be generated. the cpu only reads receiving buffer 2 (sc0buf). even before the cpu reads receiving buffer 2 (sc0buf), the received data can be stored in receiving buffer 1. however, unless receiving buffer 2 (sc0buf) is read before all bits of the next data are received by receiving buffer 1, an ove rrun error occurs. if an overrun error occurs, the contents of receiving buffer 1 will be lost, although the contents of receiving buffer 2 and sc0cr will be preserved. sc0cr is used to store either the parity bit ? added in 8-bit uart mode ? or the most significant bit (msb) ? in 9-bit uart mode. in 9-bit uart mode the wakeup function for the slave controller is enabled by setting sc0mod0 to 1; in this mode intrx0 interrupts occur only when the value of sc0cr is 1. sio interrupt mode is select able by the register simc. (7) transmission counter the transmission counter is a 4-bit binary counter which is used in uart mode and which, like the receiving counter, counts the sioclk clock pulses; a txdclk pulse is generated every 16 sioclk clock pulses. figure 3.9.5 generation of the transmission clock (8) transmission controller ? in i/o interface mode in sclk output mode with the setting sc0cr = 0, the data in the transmission buffer is output one bit at a time to the txd0 pin on the rising or falling edge of the shift clock which is output on the sclk0 pin, according to the sc0cr setting. in sclk input mode with the setting sc0cr = 1, the data in the transmission buffer is output one bit at a time on the txd0 pin on the rising or falling edge of the sclk0 input, according to the sc0cr setting. ? in uart mode when transmission data sent from the cpu is written to the transmission buffer, transmission starts on the rising edge of the next txdclk, generating a transmission shift clock txdsft. 15 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 sioclk txdclk
tmp92c820 2007-02-16 92c820-159 handshake function serial channels 0, 1 each has a cts pin. use of this pin allows data can be sent in units of one frame; thus, overrun errors can be avoided. the handshake functions is enabled or disabled by the sc0mod setting. when the cts0 pin goes high on completion of the current data send, data transmission is halted until the cts0 pin goes low again. however, the inttx0 interrupt is generated, it requests the next data send to the cpu. the next data is written in the transmission buff er and data sending is halted. though there is no rts pin, a handshake function can be easily configured by setting any port assigned to be the rts function. the rts should be output ?high? to request send data halt after data receive is completed by software in the rxd interrupt routine. figure 3.9.6 handshake function note 1: if the cts signal goes high during transmission, no more data will be sent after completion of the current transmission. note 2: transmission starts on the first falling edge of the txdclk clock after the cts signal has fallen. figure 3.9.7 cts (clear to send) timing 3 13 14 15 16 1 2 sioclk 3 14 15 16 1 2 start bit bit0 (1) (2) send is suspended from (1) and (2). timing to write to the transmission buffer cts txdclk txd txd cts rxd rts (any port) tmp92c820 tmp92c820 sender receiver
tmp92c820 2007-02-16 92c820-160 (9) transmission buffer the transmission buffer (sc0buf) shifts out and sends the transmission data written from the cpu form the least signific ant bit (lsb) in order. when all the bits are shifted out, the transmission buffe r becomes empty and generates an inttx0 interrupt. (10) parity control circuit when sc0cr in the serial channel control register is set to 1, it is possible to transmit and receive data with parity. howe ver, parity can be added only in 7-bit uart mode or 8-bit uart mode. the sc0cr field in the serial channel control register allows either even or odd parity to be selected. in the case of transmission, parity is automatically generated when data is written to the transmission buffer sc0buf. the data is transmitted after the parity bit has been stored in sc0buf in 7-bit uart mode or in sc0mod0 in 8-bit uart mode. sc0cr and sc0cr mu st be set before the transmission data is written to the transmission buffer. in the case of receiving, data is shifted into receiving buffer 1, and the parity is added after the data has been transferred to rece iving buffer 2 (sc0buf), and then compared with sc0buf in 7-bit uart mode or with sc0cr in 8-bit uart mode. if they are not equal, a parity error is generated and the sc0cr flag is set. (11) error flags three error flags are provided to increase the reliability of data reception. 1. overrun error if all the bits of the next data item have been received in receiving buffer 1 while valid data still remains stored in receiving buffer 2 (sc0buf), an overrun error is generated. the below is a recommended flow when the overrun error is generated. (intrx interrupt routine) (1) read receiving buffer (2) read error flag (3) if = 1 then (a) set to disable receiving (write ?0? to sc0mod0) (b) wait to terminate current frame (c) read receiving buffer (d) read error flag (e) set to enable receiving (write ?1? to sc0mod0) (f) request to transmit again (4) other 2. parity error the parity generated for the data shifte d into receiving buffer 2 (sc0buf) is compared with the parity bit received vi a the rxd pin. if they are not equal, a parity error is generated.
tmp92c820 2007-02-16 92c820-161 3. framing error the stop bit for the received data is sampled three times around the center. if the majority of the samples are 0, a framing error is generated. (12) timing generation 1. in uart mode receiving mode 9 bits (note) 8 bits + parity (note) 8 bits, 7 bits + parity, 7 bits interrupt timing center of last bit (bit8) center of last bit (parity bit) center of stop bit framing error timing center of stop bit center of stop bit center of stop bit parity error timing ? center of last bit (parity bit) center of stop bit overrun error timing center of last bit (bit8) center of last bit (parity bit) center of stop bit note1: in 9-bit and 8-bit ? parity modes, interrupts coincide with the ninth bit pulse. thus, when servicing the interrupt, it is necessary to wait for a 1-bit period (to allow the stop bit to be transferred) to allow checking for a framing error. note2: the higher the transfer rate, the later than the middle receive interrupts and errors occur. transmitting mode 9 bits 8 bits + parity 8 bits, 7 bits + parity, 7 bits interrupt timing just before stop bit is transmitted 2. i/o interface sclk output mode immediately after last bit data. (see 15h figure 3.9.25) transmission interrupt timing sclk input mode immediately after rise of last sclk signal rising mode, or immediately after fall in falling mode.) (see 16h figure 3.9.26) sclk output mode timing used to transfer received to data receive buffer 2 (sc0buf) (e.g., immediately after last sclk) (see 17h figure 3.9.27) receiving interrupt timing sclk input mode timing used to transfer received data to receive buffer 2 (sc0buf) (e.g., immediately after last sclk). (see 18h figure 3.9.28)
tmp92c820 2007-02-16 92c820-162 3.9.3 sfrs 7 6 5 4 3 2 1 0 bit symbol tb8 ctse rxe wu sm1 sm0 sc1 sc0 read/write r/w after reset 0 0 0 0 0 0 0 0 function transfer data bit8 hand shake 0: cts disable 1: cts enable receive function 0: receive disable 1: receive enable wakeup function 0: disable 1: enable serial transmission mode 00: i/o interface mode 01: 7-bit uart mode 10: 8-bit uart mode 11: 9-bit uart mode serial transmission clock (uart) 00: ta0trg 01: baud rate generator 10: internal clock f io 11: external clock (sclk0 input) serial transmission clock source (uart) 00 tmra0 match detect signal 01 baud rate generator 10 internal clock f io 11 external clock (sclk0 input) note: the clock selection for the i/o interface mode is controlled by the serial control register (sc0cr). serial transmission mode 00 i/o interface mode 01 7-bit mode 10 8-bit mode 11 uart mode 9-bit mode wakeup function 9-bit uart other modes 0 interrupt generated when data is received 1 interrupt generated only when sc0cr = 1 don?t care receiving function 0 receive disabled 1 receive enabled handshake function ( cts pin) 0 disabled (always transferable) 1 enabled transmission data bit8 figure 3.9.8 serial mode control register (channel 0, sc0mod0) sc0mod0 (1202h)
tmp92c820 2007-02-16 92c820-163 7 6 5 4 3 2 1 0 bit symbol tb8 ctse rxe wu sm1 sm0 sc1 sc0 read/write r/w after reset 0 0 0 0 0 0 0 0 function transfer data bit8 hand shake 0: cts disable 1: cts enable receive function 0: receive disable 1: receive enable wakeup function 0: disable 1: enable serial transmission mode 00: i/o interface mode 01: 7-bit uart mode 10: 8-bit uart mode 11: 9-bit uart mode serial transmission clock (uart) 00: ta0trg 01: baud rate generator 10: internal clock f io 11: external clock (sclk1 input) serial transmission clock source (for uart) 00 tmra0 match detect signal 01 baud rate generator 10 internal clock f io 11 external clock (sclk1 input) note: the clock selection for the i/o interface mode is controlled by the serial control register (sc1cr). serial transmission mode 00 i/o interface mode 01 7-bit mode 10 8-bit mode 11 uart mode 9-bit mode wakeup function 9-bit uart other modes 0 interrupt generated when data is received 1 interrupt generated only when sc1cr = 1 don?t care receiving function 0 receive disabled 1 receive enabled handshake function ( cts pin) 0 disabled (always transferable) 1 enabled transmission data bit8 figure 3.9.9 serial mode control register (channel 1, sc1mod0) sc1mod0 (120ah)
tmp92c820 2007-02-16 92c820-164 7 6 5 4 3 2 1 0 bit symbol tb8 ? rxe wu sm1 sm0 sc1 sc0 read/write r/w after reset 0 0 0 0 0 0 0 0 function transfer data bit8 always write ?0?. receive function 0: receive disable 1: receive enable wakeup function 0: disable 1: enable serial transmission mode 00: i/o interface mode 01: 7-bit uart mode 10: 8-bit uart mode 11: 9-bit uart mode serial transmission clock (uart) 00: ta0trg 01: baud rate generator 10: internal clock f io 11: reserved serial transmission clock source (for uart) 00 tmra0 match detect signal 01 baud rate generator 10 internal clock f io 11 reserved serial transmission mode 00 i/o interface mode 01 7-bit mode 10 8-bit mode 11 uart mode 9-bit mode wakeup function 9-bit uart other modes 0 interrupt generated when data is received 1 interrupt generated only when sc2cr = 1 don?t care receiving function 0 receive disabled 1 receive enabled transmission data bit8 figure 3.9.10 serial mode contro l register (channel 2, sc2mod0) sc2mod0 (1212h)
tmp92c820 2007-02-16 92c820-165 7 6 5 4 3 2 1 0 bit symbol rb8 even pe oerr perr ferr sclks ioc read/write r r/w r (cleared to 0 when read) r/w after reset undefined 0 0 0 0 0 0 0 1: error function received data bit8 parity 0: odd 1: even parity addition 0: disable 1: enable overrun parity framing 0: sclk0 1: sclk0 0: baud rate generato r 1: sclk0 pin input i/o interface input clock selection 0 baud rate generator 1 sclk0 pin input edge selection for sclk pin (input/output mode) 0 transmits and receives data on rising edge of sclk0. 1 transmits and receives data on falling edge of sclk0. framing error flag parity error flag overrun error flag parity additions enable 0 disabled 1 enabled even parity addition/check 0 odd parity 1 even parity received data bit8 note: as all error flags are cleared after reading do not test only a single bit with a bit-testing instruction. figure 3.9.11 serial control register (channel 0, sc0cr) sc0cr (1201h) cleared to 0 when read
tmp92c820 2007-02-16 92c820-166 7 6 5 4 3 2 1 0 bit symbol rb8 even pe oerr perr ferr sclks ioc read/write r r/w r (cleared to 0 when read) r/w after reset undefined 0 0 0 0 0 0 0 1: error function received data bit8 parity 0: odd 1: even parity addition 0: disable 1: enable overrun parity framing 0: sclk1 1: sclk1 0: baud rate generato r 1: sclk1 pin input i/o interface input clock select 0 baud rate generator 1 sclk1 pin input edge selection for sclk pin (input/output mode) 0 transmits and receives data on rising edge of sclk1. 1 transmits and receives data on falling edge of sclk1. framing error flag parity error flag overrun error flag parity additions enable 0 disabled 1 enabled even parity addition/check 0 odd parity 1 even parity received data bit8 note: as all error flags are cleared after reading do not test only a single bit with a bit-testing instruction. figure 3.9.12 serial control register (channel 1, sc1cr) sc1cr (1209h) cleared to 0 when read
tmp92c820 2007-02-16 92c820-167 7 6 5 4 3 2 1 0 bit symbol rb8 even pe oerr perr ferr ? ? read/write r r/w r (cleared to 0 when read) r/w after reset undefined 0 0 0 0 0 0 0 1: error function received data bit8 parity 0: odd 1: even parity addition 0: disable 1: enable overrun parity framing always write ?0?. always write ?0?. framing error flag parity error flag overrun error flag parity additions enable 0 disabled 1 enabled even parity addition/check 0 odd parity 1 even parity received data bit8 note: as all error flags are cleared after reading do not te st only a single bit with a bit-testing instruction. figure 3.9.13 serial control register (channel 2, sc2cr) sc2cr (1211h) cleared to 0 when read
tmp92c820 2007-02-16 92c820-168 7 6 5 4 3 2 1 0 bit symbol ? br0adde br0ck1 br0ck0 br0s3 br0s2 br0s1 br0s0 read/write r/w after reset 0 0 0 0 0 0 0 0 function always write ?0?. + (16 ? k)/16 division 0: disable 1: enable 00: t0 01: t2 10: t8 11: t32 divided frequency setting + (16 ? k)/16 division enable setting the input clock of baud rate generator 7 6 5 4 3 2 1 0 bit symbol br0k3 br0k2 br0k1 br0k0 read/write r/w after reset 0 0 0 0 function sets frequency divisor ?k? (divided by n + (16 ? k)/16) sets baud rate generator frequency divisor br0cr = 1 br0cr = 0 br0cr br0add 0000 (n = 16) or 0001 (n = 1) 0010 (n = 2) to 1111 (n = 15) 0001 (n = 1) (uart only) to 1111 (n = 15) 0000 (n = 16) 0000 disable disable 0001 (k = 1) to 1111 (k = 15) disable divided by n + (16 ? k)/16 divided by n note1: availability of +(16-k)/16 division function n uart mode i/o mode 2 to 15 1 , 16 the baud rate generator can be set to ?1? in uart mode only when the +(16-k)/16 division function is not used. do not use in i/o interface mode. note2: set br0cr to 1 after setting k (k = 1 to 15) to br0add when +(16-k)/16 division function is used. writes to unused bits in the br0a dd register do not affect operation, and undefined data is read from these unused bits. figure 3.9.14 baud rate generator control (channel 0, br0cr, br0add) br0add (1204h) br0cr (1203h) 00 internal clock t0 01 internal clock t2 10 internal clock t8 11 internal clock t32 0 disable 1 enable
tmp92c820 2007-02-16 92c820-169 7 6 5 4 3 2 1 0 bit symbol ? br1adde br1ck1 br1ck0 br1s3 br1s2 br1s1 br1s0 read/write r/w after reset 0 0 0 0 0 0 0 0 function always write ?0?. + (16 ? k)/16 division 0: disable 1: enable 00: t0 01: t2 10: t8 11: t32 divided frequency setting + (16 ? k)/16 division enable input clock selection for baud rate generator 7 6 5 4 3 2 1 0 bit symbol br1k3 br1k2 br1k1 br1k0 read/write r/w after reset 0 0 0 0 function set frequency divisor k (divided by n + (16 ? k)/16) baud rate generator frequency divisor setting br1cr = 1 br1cr = 0 br1cr br1add 0000 (n = 16) or 0001 (n = 1) 0010 (n = 2) to 1111 (n = 15) 0001 (n = 1) (uart only) to 1111 (n = 15) 0000 (n = 16) 0000 disable disable 0001 (k = 1) to 1111 (k = 15) disable divided by n + (16 ? k)/16 divided by n note1: availability of +(16-k)/16 division function n uart mode i/o mode 2 to 15 1 , 16 the baud rate generator can be set ?1? in uart mo de only when the +(16-k)/16 division function is not used. do not use in i/o interface mode. note2: set br1cr to 1 after setting k (k = 1 to 15) to br1add when the +(16-k)/16 division function is used. writes to unused bits in t he br1add register do not affect operation, and undefined data is read from these unused bits. figure 3.9.15 baud rate generator control (channel 1, br1cr, br1add) br1cr (120bh) 00 internal clock t0 01 internal clock t2 10 internal clock t8 11 internal clock t32 0 disabled 1 enabled br1add (120ch)
tmp92c820 2007-02-16 92c820-170 7 6 5 4 3 2 1 0 bit symbol ? br2adde br2ck1 br2ck0 br2s3 br2s2 br2s1 br2s0 read/write r/w after reset 0 0 0 0 0 0 0 0 function always write ?0?. + (16 ? k)/16 division 0: disable 1: enable 00: t0 01: t2 10: t8 11: t32 divided frequency setting + (16 ? k)/16 division enable input clock selection for baud rate generator 7 6 5 4 3 2 1 0 bit symbol br2k3 br2k2 br2k1 br2k0 read/write r/w after reset 0 0 0 0 function set frequency divisor k (divided by n + (16 ? k)/16) baud rate generator frequency divisor setting br2cr = 1 br2cr = 0 br2cr br2add 0000 (n = 16) or 0001 (n = 1) 0010 (n = 2) to 1111 (n = 15) 0001 (n = 1) (uart only) to 1111 (n = 15) 0000 (n = 16) 0000 disable disable 0001 (k = 1) to 1111 (k = 15) disable divided by n + (16 ? k)/16 divided by n note1: availability of +(16-k)/16 division function n uart mode i/o mode 2 to 15 1 , 16 the baud rate generator can be set ?1? in uart mo de only when the +(16-k)/16 division function is not used. do not use in i/o interface mode. note2: set br2cr to 1 after setting k (k = 1 to 15) to br2add when the +(16-k)/16 division function is used. writes to unused bits in t he br2add register do not affect operation, and undefined data is read from these unused bits. figure 3.9.16 baud rate generator control (channel 2, br2cr, br2add) br2cr (1213h) 00 internal clock t0 01 internal clock t2 10 internal clock t8 11 internal clock t32 0 disabled 1 enabled br2add (1214h)
tmp92c820 2007-02-16 92c820-171 7 6 5 4 3 2 1 0 tb7 tb6 tb5 tb4 tb3 tb2 tb1 tb0 (transmission) 7 6 5 4 3 2 1 0 rb7 rb6 rb5 rb4 rb3 rb2 rb1 rb0 (receiving) sc0buf (1200h) note: prohibit read-modify-write for sc0buf. figure 3.9.17 serial transmission/receiv ing buffer registers (channel 0, sc0buf) 7 6 5 4 3 2 1 0 bit symbol i2s0 fdpx0 read/write r/w r/w after reset 0 0 function idle2 0: stop 1: run duplex 0: half 1: full figure 3.9.18 serial mode control register 1 (channel 0, sc0mod1) 7 6 5 4 3 2 1 0 tb7 tb6 tb5 tb4 tb3 tb2 tb1 tb0 (transmission) 7 6 5 4 3 2 1 0 rb7 rb6 rb5 rb4 rb3 rb2 rb1 rb0 (receiving) sc1buf (1208h) note: prohibit read-modify-write for sc1buf. figure 3.9.19 serial transmission/receiv ing buffer registers (channel 1, sc1buf) 7 6 5 4 3 2 1 0 bit symbol i2s1 fdpx1 read/write r/w r/w after reset 0 0 function idle2 0: stop 1: run duplex 0: half 1: full figure 3.9.20 serial mode control register 1 (channel 1, sc1mod1) sc0mod1 (1205h) sc1mod1 (120dh)
tmp92c820 2007-02-16 92c820-172 7 6 5 4 3 2 1 0 tb7 tb6 tb5 tb4 tb3 tb2 tb1 tb0 (transmission) 7 6 5 4 3 2 1 0 rb7 rb6 rb5 rb4 rb3 rb2 rb1 rb0 (receiving) sc2buf (1210h) note: prohibit read-modify-write for sc1buf. figure 3.9.21 serial transmission/receiv ing buffer registers (channel 2, sc2buf) 7 6 5 4 3 2 1 0 bit symbol i2s2 fdpx2 read/write r/w r/w after reset 0 0 function idle2 0: stop 1: run duplex 0: half 1: full figure 3.9.22 serial mode control register 1 (channel 2, sc2mod1) sc2mod1 (1215h)
tmp92c820 2007-02-16 92c820-173 3.9.4 operation in each mode (1) mode 0 (i/o interface mode) this mode allows an increase in the numb er of i/o pins available for transmitting data to or receiving data from an external shift register. this mode includes the sclk output mode to output synchronous clock sclk and sclk input mode to input external synchronous clock sclk. figure 3.9.23 sclk output mode connection example figure 3.9.24 example of sclk input mode connection output extension tc74hc595 or equivalent a b si c d sck e f rck g h txd sclk port shift register tmp92c820 input extension tc74hc165 or equivalent a b qh c d clock e f s/ l g h rxd sclk port shift register tmp92c820 output extension tc74hc595 or equivalent a b si c d sck e f rck g h txd sclk port shift register tmp92c820 input extension tc74hc165 or equivalent a b qh c d clock e f s/ l g h rxd sclk port shift register tmp92c820 external clock external clock
tmp92c820 2007-02-16 92c820-174 1. transmission in sclk output mode 8-bit data and a synchronous clock are output on the txd0 and sclk0 pins respectively each time the cpu writes the data to the transmission buffer. when all data is output, intes0 will be set to generate the inttx0 interrupt. figure 3.9.25 transmitting operation in i/o interface mode (sclk0 output mode) (channel 0) in sclk input mode, 8-bit data is ou tput on the txd0 pin when the sclk0 input becomes active after the data has been written to the transmission buffer by the cpu. when all data is output, intes0 will be set to generate inttx0 interrupt. figure 3.9.26 transmitting operation in i/o interface mode (sclk0 input mode) (channel 0) bit0 bit1 bit6 bit7 bit5 sclk0 input ( = 0: rising edge mode) sclk0 input ( = 1: falling edge mode) txd0 itx0c (inttx0 intterrupt request) sclk0 output ( = 0: rising edge mode) timing to write transmisison data txd0 itx0c (inttx0 interrupt request) bit7 bit0 bit1 bit6 (internal clock timing) sclk0 output ( = 1: falling edge mode)
tmp92c820 2007-02-16 92c820-175 2. receiving in sclk output mode the synchronous clock is output on the sclk0 pin and the data is shifted to receiving buffer 1. this is initiated when the receive interrupt flag intes0 is cleared as the received data is read. when 8-bit data is received, the data is transferred to receiving buffer 2 (sc0buf) following the timing shown below and intes0 is set to 1 again, causing an intrx0 interrupt to be generated. setting sc0mod0 to 1 initiates sclk output. figure 3.9.27 receiving operation in i/o interface mode (sclk0 output mode) in sclk input mode the data is shifte d to receiving buffer 1 when the sclk input goes active. the sclk input goes active when the receive interrupt flag intes0 is cleared as the received data is read. when 8-bit data is received, the data is shifted to receiving buffer 2 (sc0buf) following the timing shown below and intes0 is set to 1 again, causing an intrx0 interrupt to be generated. figure 3.9.28 receiving operation in i/o interface mode (sclk0 input mode) note: the system must be put in the receive enable state (sc0mod0 = 1) before data can be received. sclk0 output ( = 0: rising edge mode) irx0c (intrx0 interrupt request) bit7 bit0 bit1 bit6 rxd0 sclk0 output ( = 1: falling edge mode) bit0 bit1 bit6 bit7 bit5 sclk0 input ( = 0: rising edge mode) sclk0 input ( = 1: falling edge mode) rxd1 irx0c (intrx0 intterrupt request)
tmp92c820 2007-02-16 92c820-176 3. transmission and receiving (full duplex mode) when full duplex mode is used, set th e receive interrupt level to 0 and set enable the level of transmit interrupt. ensure that the program which transmits the interrupt reads the receiving buffer before setting the next transmit data. the following is an example of this: example: channel 0, sclk output baud rate = 9600 bps f c = 4.9152 mhz * clock state clock gear 1/1 (f c ) main routine 7 6 5 4 3 210 intes0 x 0 0 1 x 0 0 0 set the inttx0 level to 1. set the intrx0 level to 0. pfcr x x ? ? ? 1 0 1 set pf0, pf1, and pf2 to function as the txd0, rxd0, pffc x x ? x ? 1 x 1 and sclk0 pins respectively. sc0mod0 ? ? ? ? 0 0 ? ? enable receiving and select i/o interface mode. sc0mod1 1 1 x x x x x x select full duplex mode. sc0cr 0 0 0 0 0 0 0 0 sclk output, transmit on negative edge, receive on positive edge. br0cr 0 0 0 1 1 0 0 0 baud rate = 9600 bps. sc0mod0 ? ? 1 ? ? ? ? ? enable receiving. sc0buf * * * * * * * * set the transmit data and start. inttx0 interrupt routine acc sc0buf read the receiving buffer. sc0buf * * * * * * * * set the next transmit data. x: don?t care, ? : no change
tmp92c820 2007-02-16 92c820-177 (2) mode 1 (7-bit uart mode) 7-bit uart mode is selected by setting the serial channel mode register sc0mod0 field to 01. in this mode a parity bit can be added. use of a parity bit is enabled or disabled by the setting of the serial channel control re gister sc0cr bit; whether even parity or odd parity will be used is determ ined by the sc0cr setting when sc0cr is set to 1 (enabled). example: when transmitting data of the following form at, the control registers should be set as described below. transmission direction (transmission rate: 2400 bps at f sys = 39.3216 mhz) * clock state clock gear 1/1 (f c ) 7 6 5 4 3 210 pfcr x x ? ? ? ? ? 1 pffc x x ? x ? ? x1 set pf0 to function as the txd0 pin. sc0mod0 ? 0 ? ? 0 101 select 7-bit uart mode. sc0cr ? 1 1 ? ? ? 00 add even parity. br0cr 0 0 1 0 1 0 0 0 set the transfer rate to 2400 bps. intes0 x 1 0 0 ? ? ? ? enable the inttx0 interrupt and set it to interrupt level 4. sc0buf * * * * * * * * set data for transmission. x: don?t care, ? : no change (3) mode 2 (8-bit uart mode) 8-bit uart mode is selected by setting sc0mod0 to 10. in this mode a parity bit can be added (use of a parity bi t is enabled or disabled by the setting of sc0cr); whether even parity or odd parity will be used is determined by the sc0cr setting when sc0cr is set to 1 (enabled). example: when receiving data of the following forma t, the control registers should be set as described below. transmission direction (transmission rate: 9600 bps at f c = 39.3216 mhz) * clock state clock gear 1/1 (f c ) main settings 7 6 5 4 3 210 pfcr x x ? ? ? ? 0 ? set pf1 to function as the rxd0 pin. sc0mod0 ? 0 1 ? 1 001 enable receiving in 8-bit uart mode. sc0cr ? 0 1 ? ? ? 00 add odd parity. br0cr 0 0 0 1 1 0 0 0 set the transfer rate to 9600 bps. intes0 ? ? ? ? x 100 enable the intrx0 interrupt and set it to interrupt level 4. interrupt processing acc ( sc0cr and 00011100 if acc ( 0 then error check for errors. acc ( sc0buf read the received data. x: don?t care, (: no change bit0 1 2 3 4 5 even parity stop start 6 bit0 1 2 3 4 5 odd parity stop start 6
tmp92c820 2007-02-16 92c820-178 (4) mode 3 (9-bit uart mode) 9-bit uart mode is selected by setting sc0mod0 to 11. in this mode parity bit cannot be added. in the case of transmission the msb (9th bit) is written to sc0mod0. in the case of receiving it is stored in sc0cr. when the buffer is written and read, the msb is read or written first, before the rest of the sc0buf data. wakeup function in 9-bit uart mode, the wakeup function fo r slave controllers is enabled by setting sc0mod0 to 1. the interrupt intrx0 can only be generated when = 1. note: the txd pin of each slave controller must be in open-drain output mode. figure 3.9.29 serial link using wakeup function txd rxd master txd rxd slave 1 txd rxd slave 2 txd rxd slave 3
tmp92c820 2007-02-16 92c820-179 protocol 1. select 9-bit uart mode on the master and slave controllers. 2. set the sc0mod0 bit on each slave controller to 1 to enable data receiving. 3. the master controller transmits data one fr ame at a time. each frame includes an 8-bit select code which identifies a slave controller. the msb (bit8) of the data () is set to 1. 4. each slave controller receives the above frame. each controller checks the above select code against its own select code. the controll er whose code matches clears its bit to 0. 5. the master controller transmits data to the specified slave controller (the controller whose sc0mod0 bit has been cleared to 0). the msb (bit8) of the data () is cleared to 0. 6. the other slave controllers (whose bits remain at 1) ignore the received data because their msbs (bit8 or ) are set to 0, disabling intrx0 interrupts. the slave controller whose bit = 0 can also transmit to the master controller. in this way it can signal the master controller that the data transmission from the master controller has been completed. start bit0 1 23456 select code of slave controller 7 stop 8 ?1? start bit0 1 23456 data 7 stop bit8 ?0?
tmp92c820 2007-02-16 92c820-180 example: to link two slave controllers serially wi th the master controller using the internal clock f io as the transfer clock. since serial channels 0 and 1 operate in exactly the same way, channel 0 only is used for the purposes of this explanation. ? setting the master controller main 7 6 5 4 3 210 pfcr x x ? ? ? ? 01 pffc x x ? x ? ? x1 set pf0 and pf1 to function as the txd0 and rxd0 pins respectively. intes0 1 1 0 0 1 1 0 1 enable the inttx0 interrupt and set it to interrupt level 4. enable the intrx0 interrupt and set it to interrupt level 5. sc0mod0 1 0 1 0 1 1 1 0 set f io as the transmission clock for 9-bit uart mode. sc0buf 0 0 0 0 0 0 0 1 set the select code for slave controller 1. inttx0 interrupt sc0mod0 0 ? ? ? ? ? ? ? set tb8 to 0. sc0buf * * * * * * * * set data for transmission. ? setting the slave controller main 7 6 5 4 3 210 pfcr x x ? ? ? ? 00 pffc x x ? x ? ? x1 select pf1 and pf0 to function as the rxd and txd pins respectively (open-drain output). intes0 1 1 0 1 1 1 1 0 enable intrx0 and inttx0. sc0mod0 0 0 1 1 1 1 1 0 set to 1 in 9-bit uart transmission mode using f sys as the transfer clock. intrx0 interrupt acc sc0buf if acc = select code then sc0mod0 ? ? ? 0 ? ? ? ? ? clear to 0. txd rxd master txd rxd slave 1 txd rxd slave 2 select code 00000001 select code 00001010
tmp92c820 2007-02-16 92c820-181 3.9.5 support for irda sio0 includes support for the irda 1.0 in frared data communication specification. 19h figure 3.9.30 shows the block diagram. tmp92c820 figure 3.9.30 block diagram (1) modulation of the transmission data when the transmit data is 0, the modem outputs 1 to txd0 pin with either 3/16 or 1/16 times for width of baud-rate. the pulse width is selected by the sircr. when the transmit data is 1, the modem outputs 0. figure 3.9.31 transmission example (2) modulation of the receive data when the receive data is the effective width of pulse ?1?, the modem outputs ?0? to sio0. otherwise the modem outputs ?1? to sio0. the effective pulse width is selected by sircr. figure 3.9.32 receiving example transmission data sio0 ir modulator ir demodulator receive data ir transmitter&led ir receiver modem ir transceiver module txd0 rxd0 ir output ir input start transmission data sto p 0 0 0 0 1 0 1 1 txd0 pin start data after modulation sto p 1 1 0 0 1 0 1 0 receiving pulse = ?0? receiving pulse = ?1?
tmp92c820 2007-02-16 92c820-182 (3) data format the data format is fixed as follows: y data length: 8 bits y parity bits: none y stop bits: 1 (4) sfrs 20h figure 3.9.33 shows the control register sircr. set the data sircr during sio0 is stopping. the following example desc ribes how to set this register: 1) sio setting ; set the sio to uart mode. 2) ld (sircr), 07h ; set the receive data pulse width to 16x. 3) ld (sircr), 37h ; txen, rxen enable the transmission and receiving. 4) start transmission and receiving for sio0 ; the modem operates as follows: y sio0 starts transmitting. y ir receiver starts receiving. (5) notes the irda 1.0 specification is defined in 21h table 3.9.4. 1. making baud rate when using irda in baud rate during using irda, must set ?01? to sc0mod0 in sio by using baud rate generator. ta0trg, f io , sclk0 input can not using. 2. output pulse width and baud rate generator during transmission irda as the irda 1.0 physical layer specification, the data transfer speed and infra-red pulse width is specified. table 3.9.4 baud rate and pulse width specifications baud rate modulation rate to l e r a n c e (% of rate) pulse width (minimum) pulse width (typical) pulse width (maximum) 2.4 kbps rzi 0.87 1.41 s 78.13 s 88.55 s 9.6 kbps rzi 0.87 1.41 s 19.53 s 22.13 s 19.2 kbps rzi 0.87 1.41 s 9.77 s 11.07 s 38.4 kbps rzi 0.87 1.41 s 4.88 s 5.96 s 57.6 kbps rzi 0.87 1.41 s 3.26 s 4.34 s 115.2 kbps rzi 0.87 1.41 s 1.63 s 2.23 s the pulse width is defined either baud rate tx 3/16 or 1.6 s (1.6 s is equal to 3/16 pulse width when baud rate is 115.2 kbps). the tmp92c820 has the function selects the pulse width of transmission either 3/16 or 1/16. but 1/16 pulse width can be selected when the baud rate is equal or less than 38.4 kbps.
tmp92c820 2007-02-16 92c820-183 as the same reason, + (16 ? k)/16 division function in the baud rate generator of sio0 can not be used to generate 115.2 kbps baud rate. also when the 38.4 kbps and 1/16 pulse width, + (16 ? k)/16 division function can not be used. table 3.9.5 baud rate and pulse width for (16 ? k)/16 division function baud rate pulse width 115.2 kbps 57.6 kbps 38.4 kbps 19.2 kbps 9.6 kbps 2.4 kbps t 3/16 t 1/16 ? ? : can be used (16 ? k)/16 division function : can not be used (16 ? k)/16 division function ? : can not be set to 1/16 pulse width 7 6 5 4 3 2 1 0 bit symbol plsel rxsel txen rxen sirwd3 sirwd2 sirwd1 sirwd0 read/write r/w after reset 0 0 0 0 0 0 0 0 function select transmit pulse width 0: 3/16 1: 1/16 receive data 0: ?h? pulse 1: ?l? pulse transmit 0: disable 1: enable receive 0: disable 1: enable select receive pulse width set effective pulse width for equal or more than 2x (value + 1) + 100ns can be set: 1 to 14 can not be set: 0, 15 select receive pulse width formula: effective pulse width 2x (value + 1) + 100ns x = 1/f sys 0000 can not be set equal to or more than 4x + 100 ns 0001 to 1110 equal to or more than 30x + 100 ns 1111 cannot be set receive operation 0 disabled (received input is ignored.) 1 enabled transmit operation 0 disabled (input from sio is ignored.) 1 enabled select transmit pulse width 0 3/16 1 1/16 note: if a pulse width complying with the irda1.0 standard (1.6 s min.) can be guaranteed with a low baud rate, setting this bit to ?1? will result in result reduced power dissipation. figure 3.9.33 irda control register sircr (1207h)
tmp92c820 2007-02-16 92c820-184 3.10 serial bus interface (sbi) the tmp92c820 has 1-channel serial bus interface which employs a clocked-synchronous 8-bit sio mode and an i 2 c bus mode. it is called sbi0. the serial bus interface is connected to an ex ternal device through p91 (sda) and p92 (scl) in the i 2 c bus mode; and through p90 (sck), p91 (so), p92 (si) in the clocked-synchronous 8-bit sio mode. each pin is specified as follows. p9ode p9cr p9fc i 2 c bus mode 11 11x 11x clocked synchronous 8-bit sio mode xx 011 010 011 010 (note) x: don?t care note : when using si input function and sck input f unction, set p9fc to ?0? (function setting). 3.10.1 configuration figure 3.10.1 serial bus interface 0 (sbi0) p90 (sck) sio clock control divider i 2 c bus clock sync. + control sbi0cr2/ sbi0sr scl sck input/ output control so si sda i2c0ar sbi0br sbi0cr1 sbi0br0, 1 shift register transfer control circuit noise canceller t noise canceller i 2 c bus data control sio data control intsbe0 interrupt request (address/data) p91 (so/sda) p92 (si/scl) sbi0 control register 2/ sbi0 status registe r i 2 c bus 0 address register sbi0 data buffer register sbi0 control register 1 sbi0 baud rate register 0, 1
tmp92c820 2007-02-16 92c820-185 3.10.2 serial bus interface (sbi) control the following registers are used to control the serial bus interface and monitor the operation status. ? serial bus interface 0 control register 1 (sbi0cr1) ? serial bus interface 0 control register 2 (sbi0cr2) ? serial bus interface 0 data buffer register (sbi0dbr) ? i 2 c bus 0 address register (i2c0ar) ? serial bus interface 0 status register (sbi0sr) ? serial bus interface 0 baud rate register 0 (sbi0br0) ? serial bus interface 0 baud rate register 1 (sbi0br1) the above registers differ depending on a mo de to be used. refer to section 3.10.4 ?i 2 c bus mode control register? and 3.10.7 ?clock ed-synchronous 8-bit sio mode control?. 3.10.3 the data formats in the i 2 c bus mode the data formats in the i 2 c bus mode are shown below. (a) addressing format (b) addressing format (with restart) (c) free data format (data transferred from master device to slave device) figure 3.10.2 data format in the i 2 c bus mode s slave address r / w data a c k a c k s slave address r / w data a c k a c k p 8 bits 1 1 to 8 bits 1 8 bits 1 1 to 8 bits 1 1 1 or more 1 1 or more s slave address r / w data a c k a c k data a c k p 8 bits 1 1 to 8 bits 1 1 to 8 bits 1 1 1 or more s data data a c k a c k data a c k p 8 bits 1 1 to 8 bits 1 1 to 8 bits 1 1 1 or more s: start condition r/ w : direction bit ack: acknowledge bit p: stop condition
tmp92c820 2007-02-16 92c820-186 3.10.4 i 2 c bus mode control register the following registers are used to control and monitor the operation status when using the serial bus interface (sbi) in the i 2 c bus mode. serial bus interface 0 control register 1 7 6 5 4 3 2 1 0 bit symbol bc2 bc1 bc0 ack sck2 sck1 sck0/ swrmon read/write w r/w w r/w after reset 0 0 0 0 0 0 0/1 (note 3) function number of transferred bits (note 1) acknowl- edge mode specifica- tion 0: not generate 1: generate internal serial clock selection and software reset monitor (note 2) internal serial clock selection at write 000 001 010 011 100 101 110 111 n = 5 n = 6 n = 7 n = 8 n = 9 n = 10 n = 11 reserved ? (note 4) ? (note 4) ? (note 4) 75.8 khz 38.5 khz 19.4 khz 9.73 khz (reserved) system clock: f sys f sys = 20 mhz (internal scl output) fscl = [hz] software reset state monitor at read 0 during software reset 1 initial data acknowledge mode specification 0 not generate clock pulse for acknowledge signal 1 generate clock pulse for acknowledge signal number of bits transferred = 0 = 1 number of clock pulses bits number of clock pulses bits 000 001 010 011 100 101 110 111 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 9 2 3 4 5 6 7 8 8 1 2 3 4 5 6 7 note 1: set the to ?000? before switching to a clocked-synchronous 8-bit sio mode. note 2: for the frequency of the scl pin clock, see 3.10.5 (3) ?serial clock?. note 3: initial data of sck0 is ?0?, swrmon is ?1?. note 4: this i 2 c bus circuit does not support fast-mode, it supports the standard mode only. although the i 2 c bus circuit itself allows the setting of a baud ra te over 100kbps, the compliance with the i 2 c specification is not guaranteed in that case. figure 3.10.3 registers for the i 2 c bus mode f sys 2 n + 8 sbi0cr1 (1240h) prohibit read- modify- write
tmp92c820 2007-02-16 92c820-187 serial bus interface 0 control register 2 7 6 5 4 3 2 1 0 bit symbol mst trx bb pin sbim1 sbim0 swrst1 swrst0 read/write w w (note 1) w (note 1) after reset 0 0 0 1 0 0 0 0 function master/ slave selection transmitter/ receiver selection start/stop condition generation cancel intsbe0 interrupt request serial bus interface operating mode selection (note 2) 00: port mode 01: sio mode 10: i 2 c bus mode 11: (reserved) software reset generate write ?10? and ?01?, then an internal software reset signal is generated. serial bus interface operating mode selection (note 2) 00 port mode (serial bus interface output disabled) 01 clocked-synchronous 8-bit sio mode 10 i 2 c bus mode 11 (reserved) intsbe0 interrupt request 0 ? 1 cancel interrupt request start/stop condition generation 0 generates the stop condition 1 generates the start condition transmitter/receiver selection 0 receiver 1 transmitter master/slave selection 0slave 1master note 1: reading this register function as sbi0sr register. note 2: switch a mode to port mode after confirming that the bus is free. switch a mode between i 2 c bus mode and clocked-synchronous 8-bit sio mode after confirming that input signals via port are high level. figure 3.10.4 registers for the i 2 c bus mode sbi0cr2 (1243h) prohibit read- modify- write
tmp92c820 2007-02-16 92c820-188 serial bus interface 0 status register 7 6 5 4 3 2 1 0 bit symbol mst trx bb pin al aas ad0 lrb read/write r after reset 0 0 0 1 0 0 0 0 function master/ slave status monitor transmitter/ receiver status monitor i 2 c bus status monitor intsbe0 interrupt request monitor arbitration lost detection monitor 0: ? 1: detected slave address match detection monitor 0: undetected 1: detected general call detection monitor 0: undetected 1: detected last received bit monitor 0: ?0? 1: ?1? last received bit monitor 0 last received bit was ?0? 1 last received bit was ?1? general call detection monitor 0 undetected 1 general call detected slave address match detection monitor 0 undetected 1 slave address match or general call detected arbitration lost detection monitor 0 ? 1 arbitration lost intsbe0 interrupt request monitor 0 interrupt requested 1 interrupt canceled i 2 c bus status monitor 0 free 1busy transmitter/receiver status monitor 0 receiver 1 transmitter master/slave status monitor 0slave 1master note: writing in this register functions as sbi0cr2. figure 3.10.5 registers for the i 2 c bus mode sbi0sr (1243h) prohibit read- modify- write
tmp92c820 2007-02-16 92c820-189 serial bus interface 0 baud rate register 0 7 6 5 4 3 2 1 0 bit symbol ? i2sbi0 read/write w r/w after reset 0 0 function always write ?0?. idle2 0: stop 1: run operation during idle2 mode 0 stop 1 operation serial bus interface 0 baud rate register 1 7 6 5 4 3 2 1 0 bit symbol p4en ? read/write w w after reset 0 0 function internal clock 0: stop 1: operate always write ?0?. baud rate clock control 0 stop 1 operate serial bus interface 0 data buffer register 7 6 5 4 3 2 1 0 bit symbol db7 db6 db5 db4 db3 db2 db1 db0 read/write r (received)/w (transfer) after reset undefined note 1: when writing transmitted data, start from the msb (bit7). receiving data is placed from lsb (bit0). note 2: sbi0dbr can?t be read the written data. therefore read-modify-write instruction (e.g., ?bit? instruction) is prohibitted. i 2 c bus 0 address register 7 6 5 4 3 2 1 0 bit symbol sa6 sa5 sa4 sa3 sa2 sa1 sa0 als read/write w after reset 0 0 0 0 0 0 0 0 function slave address selection for when dev ice is operating as slave device address recognition mode specification address recognition mode specification 0 slave address recognition 1 non slave address recognition figure 3.10.6 registers for the i 2 c bus mode sbi0br0 (1244h) prohibit read- modify- write sbi0br1 (1245h) prohibit read- modify- write sbi0dbr (1241h) prohibit read- modify- write i2c0ar (1242h) prohibit read- modify- write
tmp92c820 2007-02-16 92c820-190 3.10.5 control in i 2 c bus mode (1) acknowledge mode specification set the sbi0cr1 to ?1? for oper ation in the acknowledge mode. the tmp92c820 generates an additional clock pulse for an acknowledge signal when operating in master mode. in the transmitter mode during the clock pulse cycle, the sda pin is released in order to receive the acknowledge signal from the receiver. in the receiver mode during the clock pulse cycle, the sda pin is set to the low in order to generate the acknowledge signal. clear the to ?0? for operation in the non-acknowledge mode. the tmp92c820 does not generate a clock pulse for the acknowledge signal when operating in the master mode. (2) number of transfer bits since the sbi0cr1 is cleared to ?000? on start up, a slave address and direction bit transmissions are executed in 8 bits. other than these, the retains a specified value. (3) serial clock 1. clock source the sbi0cr1 is used to specify the maximum transfer frequency for output on the scl pin in the master mode. set the baud rates, which have been calculated according to the formula below, to meet the specifications of the i 2 c bus, such as the smallest pulse width of t low . sbi0cr1 n 000 5 001 6 010 7 011 8 100 9 101 10 110 11 figure 3.10.7 clock source t high t low 1/fscl t low = 2 n ? 1 /f sbi t high = 2 n ? 1 /f sbi + 8/f sbi fscl = 1/(t low + t high ) = f sbi 2 n + 8 note: f sbi is the clock f sys .
tmp92c820 2007-02-16 92c820-191 2. clock synchronization in the i 2 c bus mode, in order to wired-and a bus, a master device which pulls down a clock pin to the low level, in the first place, invalidate a clock pulse of another master device which generates a high-level clock pulse. the master device with a high-level clock pulse needs to detect the situation and implement the following procedure. this device has a clock synchronizatio n function which allows normal data transfer even when more than one master exists on the bus. the following example explains the clock synchronization procedures used when there are two masters present on the bus. figure 3.10.8 clock synchronization when master a pulls the internal scl output to the low level at point ?a?, the bus?s scl pin goes to the low level. after detecting this, master b resets a counter of high-level width of an own clock pulse and sets the internal scl output the low level. master a finishes counting low-level width of an own clock pulse at point ?b? and sets the internal scl output to the high level. since master b is holding the bus?s scl pin the low level, master a waits for counting high-level width of an own clock pulse. after master b has finished counting low-level width of an own clock pulse at point ?c? and master a detects the scl pin of the bus at the high level, and starts counting high level of an own clock pulse. the clock pulse on the bus is determined by the master device with the shortest high-level width and the master device with the longest low-level width from among those master devices connected to the bus. (4) slave address and address re cognition mode specification when this device is to be used as a sl ave device, set the slave address and in i2c0ar. clear the to ?0? for the address recognition mode. (5) master/slave selection to operate this device as a master device set the sbi0cr2 to ?1?. to operate it as a slave device clear the sbi0cr2 to ?0?. the is cleared to ?0? in hardware when a stop co ndition is detected on the bus or when arbitration is lost. start couting high-level width of a clock pulse internal scl output (master a) internal scl output (master b) scl pin wait counting high-level width of a clock pulse reset a counter of high-level width of a clock pulse abc
tmp92c820 2007-02-16 92c820-192 (6) transmitter/receiver selection to operate this device as a transmitter se t the sbi0cr2 to ?1?. to operate it as a receiver clear the sbi0cr2 to ?0?. when data with an addressing format is transferred in the slave mode, when a slave address with the same value that an i2c0ar or a general call is received (all 8-bit data are ?0? after a start condition), th e is set to ?1? in hardware if the direction bit ( w r/ ) sent from the master device is ?1?, and is cleared to ?0? in hardware if the bit is ?0?. in the master mode, when an acknowledge si gnal is returned from the slave device, the is cleared to ?0? in hardware if the value of the transmitted direction bit is ?1?, and is set to ?1? in hardware if the value of the bit is ?0?. if an acknowledge signal is not returned, the current state is maintained. the is cleared to ?0? in hardware when a stop condition is detected on the i 2 c bus or when arbitration is lost. (7) start/stop condition generation when the sbi0sr = ?0?, slave address and direction bit which are set to sbi0dbr is output on the bus after generating a start condition by writing ?1111? to the sbi0cr2. it is nece ssary to set transmitted data to the data buffer register (sbi0dbr) and set ?1? to the beforehand. figure 3.10.9 start condition generation and slave address generation when the sbi0sr = ?1?, the sequence for generating a stop condition can be initiated by writing ?111? to the sbi0cr2 and writing ?0? to the sbi0cr2. do not modify the contents of the sbi0cr2 until a stop condition has been generated on the bus. figure 3.10.10 stop condition generation the state of the bus can be ascertained by reading the contents of the sbi0sr. the sbi0sr will be set to ?1? if a star t condition has been detected on the bus, and will be cleared to ?0? if a stop condition has been detected. stop condition generation in master mode have limit. therefore, please refer to 3.10.6 (4) ?stop condition generation?. 1 2 34567 8 9 a6 a5 a4 a3 a2 a1 a0 r/ w slave address and the direction bit a cknowledge signal start condition scl pin sda pin scl pin sda pin stop condition
tmp92c820 2007-02-16 92c820-193 (8) interrupt service requests and interrupt cancellation when a serial bus interface interrupt request 0 by transfer of the slave address or the data (intsbe0) is generated, the sbi0sr is cleared to ?0?. the scl pin is pulled down to the low-level while the = ?0?. the is cleared to ?0? when a single word of data is transmitted or received. either writing data to or reading data from sbi0dbr sets the to ?1?. the time from the being set to ?1? until the release of the scl pin is t low . in the address recognition mode (e.g., when = ?0?), the is cleared to ?0? when the slave address matches the value set in i2c0ar or when a general call is received (all 8-bit data are ?0? after a start condition). although the sbi0cr2 can be set to ?1? by a program, writing ?0? to the sbi0cr2 does not clear it to ?0?. (9) serial bus interface operation mode selection the sbi0cr2 is used to specify the serial bus interface operation mode. set the sbi0cr2 to ?10? when the device is to be used in i 2 c bus mode after confirming pin condition of serial bus interface to ?h?. switch a mode to port after confirming a bus is free. (10) arbitration lost detection monitor since more than one master device can exist simultaneously on the bus in i 2 c bus mode, a bus arbitration procedure has been implemented in order to guarantee the integrity of transferred data. data on the sda pin is used for i 2 c bus arbitration. the following example illustrates the bus arbitration procedure when there are two master devices on the bus. master a and master b output the same data until point ?a?. after master a outputs ?l? and master b, ?h?, the sda pin of the bus is wire-and and the sda pin is pulled down to the low level by master a. when the scl pin of the bus is pulled up at point ?b?, the slave device reads the data on the sda pin, that is, data in master a. data transmitted from master b becomes invalid. the master b state is known as ?arbitration lost?. master b device which loses arbitration releases the internal sda output in order not to affect data transmitted from other masters with arbitration. when more than one mast er sends the same data at the first word, arbitration occurs continuous ly after the second word. figure 3.10.11 arbitration lost internal sda output becomes ?1? after arbitration has been lost. scl pin internal sda output (master a) internal sda output (master b) sda pin ab
tmp92c820 2007-02-16 92c820-194 this device compares the levels on the bus?s sda pin with those of the internal sda output on the rising edge of the scl pin. if the levels do not match, arbitration is lost and the sbi0sr is set to ?1?. when the is set to ?1?, the sbi0sr are cleared to ?00? and the mode is switched to a slave receiver mode. thus, clock output is stopped in data transfer after setting = ?1?. the is cleared to ?0? when data is written to or read from sbi0dbr or when data is written to sbi0cr2. figure 3.10.12 example of a master device b (d7a = d7b, d6a = d6b) (11) slave address match detection monitor the sbi0sr is set to ?1? in the slave mode, in the address recognition mode (e.g., when the i2c0ar = ?0?), when a gene ral call is received, or when a slave address matches the value set in i2c0ar. when the i2c0ar = ?1?, the sbi0sr is set to ?1? after the firs t word of data has been received. the sbi0sr is cleared to ?0? when data is written to or read from the data buffer register sbi0dbr. (12) general call detection monitor the sbi0sr is set to ?1? in the slave mode, when a general call is received (all 8-bit received data is ?0?, after a start condition). the sbi0sr is cleared to ?0? when a start condition or stop condition is detected on the bus. (13) last received bit monitor the value on the sda pin detected on the rising edge of the scl pin is stored in the sbi0sr. in the acknowledge mode, immediately af ter an intsbe0 interrupt request has been generated, an acknowledge signal is read by reading the contents of the sbi0sr. stop the clock pulse 1 keep internal sda output to high level as losing arbitration a ccessed to sbi0dbr or sbi0cr2 internal scl output internal sda output internal sda output internal scl output master a master b 2 3456789 1 2 34 d7a d6b d5a d4a d3a d2a d1a d0a d7a? d6a? d5a? d4a? 1 2 3 4 d7b d6a
tmp92c820 2007-02-16 92c820-195 (14) software reset function the software reset function is used to init ialize the sbi circuit, when sbi is rocked by external noises, etc. an internal reset signal pulse can be generated by setting sbi0cr2 to ?10? and ?01?. this initializes the sbi circuit internally. all command (except sbi0cr2) registers and status registers are initialized as well. the sbi0cr1 is auto matically set to ?1? after the sbi circuit has been initialized. (15) serial bus interface data buffer register (sbi0dbr) the received data can be read and the transferred data can be written by reading or writing the sbi0dbr. when the start condition has been generated in the master mode, the slave address and the direction bit are set in this register. (16) i 2 c bus address register (i2c0ar) i2c0ar is used to set the slave address when this device functions as a slave device. the slave address output from the master device is recognized by setting i2c0ar is set to ?0?. the data format is the addressing format. when the slave address in not recognized at the is set to ?1?, the data format is the free data format. (17) baud rate register (sbi0br1) write ?1? to the sbi0br1 before operation commences. (18) setting register for idle2 mode operation (sbi0br0) the setting of sbi0br0 determines whether the device is operating or is stopped in idle2 mode. therefore, setting is necessary before the halt instruction is executed.
tmp92c820 2007-02-16 92c820-196 3.10.6 data transfer in i 2 c bus mode (1) device initialization set the sbi0br1 and the sbi0cr1. set the sbi0br1 to ?1? and clear bits 7 to 5 and 3 of the sbi0cr1 to ?0?. set a slave address in i2c0ar and the i2c0ar ( = ?0? when an addressing format.) for specifying the default setting to a slav e receiver mode, clear ?000? to the , set ?1? to the , set ?10? to the and set ?00? to the . (2) start condition generation and slave address generation 1. master mode in the master mode the start condition and the slave address are generated as follows. check a bus free status (when = ?0?). set the sbi0cr1 to ?1? (acknowled ge mode) and specify a slave address and a direction bit to be transmitted to the sbi0dbr. when the is ?0?, the start condition is generated by writing ?1111? to the sbi0cr2. subsequently to the start condition, 9 clocks are output from the scl pin. while 8 clocks are output, the slave address and the direction bit which are set to the sbi0dbr. at the 9th clock pulse the sda pin is released and the acknowledge signal is received from the slave device. an intsbe0 interrupt request occurs on the falling edge of the 9th clock pulse. the is cleared to ?0?. in the master mode the scl pin is pulled down to the low level while the is ?0?. when an intsbe0 interrupt request occurs, the value of is changed according to the direction bit setting only if the slave device returns an acknowledge signal. 2. slave mode in the slave mode the start condition and the slave address are received. after the start condition has been received from the master device, while 8 clocks are output from the scl pin, the slave address and the direction bit which are output from the master device are received. when a general call or an address matching the slave address set in i2c0ar is received, the sda pin is pulled down to the low level at the 9th clock pulse and an acknowledge signal is output. an intsbe0 interrupt request occurs on the falling edge of the 9th clock pulse. the is cleared to ?0?. in the slave mode the scl pin is pulled down to the low-level while the = ?0?. when an interrupt request occurs, the value of is changed according to the direction bit setting only if the slave device returns an acknowledge signal.
tmp92c820 2007-02-16 92c820-197 figure 3.10.13 start condition generation and slave address transfer (3) 1-word data transfer check the setting using an intsbe0 interrupt process after the transfer of each word of data is completed and determine whether the device is in the master mode or the slave mode. 1. when the is ?1? (master mode) check the setting and determine whether the device is in the transmitter mode or the receiver mode. when the is ?1? (transmitter mode) check the setting. when the = ?1?, there is no receiver requesting data. implement the process for generating a stop condition (see section 3.10.6 (4).) and terminate data transfer. when the = ?0?, the receiver is requesting new data. when the next transmitted data is 8 bits, write the transmitted data to the sbi0dbr. when the next transmitted data is other than 8 bits, set the , set the to ?1? and write the transmitted data to the sbi0dbr. after the data has been written, the is set to ?1?, a seri al clock pulse is generated to trigger transfer of the next word of data via the scl pin, and the word is transmitted. after the data has been transmitted, an intsbe0 interrupt request is generated. the is set to ?0? and the scl pin is pulled down to the low level. if the length of the data to be transferred is greater than one word, repeat the latter steps of the procedure, starting from the check of the setting. figure 3.10.14 example in which = ?000? and = ?1? in transmitter mode 1 2 345678 9 a6 a5 a4 a3 a2 a1 ack r/ w slave address + direction bit a cknowledge signal from a slave device start condition scl pin sda pin intsbe0 interrupt request output of master output of slave a0 1 2 345678 9 d7 d6 d5 d4 d3 d2 d1 d0 a cknowledge signal from a receiver write to sbi0dbr scl pin sda pin intsbe0 interrupt request ack output from master output from slave
tmp92c820 2007-02-16 92c820-198 when the is ?0? (receiver mode) when the next transmitted data is othe r than 8 bits, set the again. set the to ?1? and read the received data from the sbi0dbr so as to release the scl pin. (the value of data which is read immediately after a slave address is sent is undefined.) after the data has been read, the is set to ?1?. serial clock pulse for transfe rring new 1 word of data is defined scl and outputs ?l? level from sda pin with acknowledge timing. an intsbe0 interrupt request is generated and the is set to ?0?. then this device pulls down the scl pin to the low level. this device outputs a clock pulse for 1 word of data transfer and the acknowledge signal each time that received data is read from sbi0dbr. figure 3.10.15 example of when = ?000?, = ?1? in receiver mode in order to terminate the transmission of data to a transmitter, clear the to ?0? before reading data which is 1 word before the last data to be received. the last data does not generate a clock pulse for the acknowledge signal. after the data has been transmitted and an interrupt request has been generated, set the to ?001? and read the data . this device generates a clock pulse for a 1-bit data transfer. since the master device is a receiver, the sda pin on a bus keeps the high level. the transmitter receives the high-level signal as an ack signal. the receiver indicates to the transmitter that data transfer is complete. after 1-bit data is received and an inte rrupt request has occurred, this device generates a stop condition (see section 3. 10.6 (4).) and terminates data transfer. figure 3.10.16 termination of data transfer in master receiver mode 1 2 3 45678 1 d7 d6 d5 d4 d3 d2 d1 d0 a cknowledge signal sent to a transmitter scl pin sda pin intsbe0 interrupt request ?001? read sbi0dbr ?0? read sbi0dbr 9 output of master output of slave 1 2 3 45678 9 d7 d6 d5 d4 d3 d2 d1 d0 a cknowledge signal to a transmitter read sbi0dbr scl pin sda pin intsbe0 interrupt request new d7 output from master output from slave ack
tmp92c820 2007-02-16 92c820-199 2. when the is ?0? (slave mode) in the slave mode, this device operates either in normal slave mode or in slave mode after losing arbitration. in the slave mode, an intsbe0 interrupt request occurs when this device receives a slave address or a general call from the master device, or when a general call is received and data transfer is complete, or after matching a received slave address. in the master mode, this device operates in a slave mode if it is losing arbitration. an intsbe0 in terrupt request occurs when word data transfer terminates after losing arbitrat ion. when an intsbe0 interrupt request occurs, the is cleared to ?0?, and the scl pin is pulled down to the low level. either reading data to or writing data from the sbi0dbr, or setting the to ?1? releases the scl pin after taking t low time. check the sbi0sr, , , and and implements processes according to conditions listed in the next table.
tmp92c820 2007-02-16 92c820-200 table 3.10.1 operation in the slave mode conditions process 1 1 0 this device loses arbitration when transmitting a slave address and receives a slave address of which the value of the direction bit sent from another master is ?1?. 1 0 in the slave receiver mode, this device receives a slave address of which the value of the direction bit sent from the master is ?1?. set the number of bits in 1 word to the and write the transmitted data to the sbi0dbr. 1 0 0 0 in the slave transmitter mode, 1-word data is transmitted. check the . if the is set to ?1?, set the to ?1? since the receiver does not request the next data. then, clear the to ?0? to release the bus. if the is cleared to ?0?, set the number of bits in a word to the and write transmitted data to the sbi0dbr since the receiver requests next data. 1 1/0 this device loses arbitration when transmitting a slave address and receives a general call or slave address of which the value of the direction bit sent from another master is ?0?. 1 0 0 this device loses arbitration when transmitting a slave address or data and terminates transferring word data. 1 1/0 in the slave receiver mode, this device receives a general call or slave address of which the value of the direction bit sent from the master is ?0?. read the sbi0dbr for setting the to ?1? (reading dummy data) or set the to ?1?. 0 0 0 1/0 in the slave receiver mode, the device terminates receiving 1-word data. set the number of bits in a word to the and read received data from the sbi0dbr.
tmp92c820 2007-02-16 92c820-201 (4) stop condition generation when the sbi0sr is ?1?, the sequence of generating a stop condition is started by setting ?111? to the sbi0cr2 and ?0? to the sbi0cr2. do not modify the contents of the sbi0cr2 until a stop condition is generated on a bus. when a scl pin of bus is pulled down by ot her devices, this devi ce generates a stop condition after they release a sc l pin and the sda becomes ?1?. figure 3.10.17 stop condition generation (single master) figure 3.10.18 stop condition generation (multi master) internal scl sda pin (read) stop condition ?1? ?1? ?0? ?1? scl pin the case of pulled low by another device scl pin sda pin (read) stop condition ?1? ?1? ?0? ?1? internal scl
tmp92c820 2007-02-16 92c820-202 (5) restart restart is used during data transfer between a master device and a slave device to change the data transfer direction. the fo llowing description explains how to restart when this device is in the master mode. clear the sbi0cr2 to ?000 ? and set the sbi0cr2 to ?1? to release the bus. the sda line remains the high level and the scl pin is released. since a stop condition is not generated on the bus, other devices assume the bus to be in a busy state. check the sbi0sr until it becomes ?0? to check that the scl pin of this device is released. check the until it becomes 1 to check that the scl line on a bus is not pulled down to the low level by other devices. after confirming that the bus stays in a free state, generate a start condition with procedure described in 3.10.6 (2). in order to meet setup time when restarting, take at least 4.7 s of waiting time by software from the time of restarting to co nfirm that the bus is free until the time to generate the start condition. figure 3.10.19 timing diagram when restarting start condition scl line internal scl output sda line 4.7 s (min) ?0? ?0? ?0? ?1? ?1? ?1? ?1? ?1? 9
tmp92c820 2007-02-16 92c820-203 3.10.7 clocked-synchronous 8-bit sio mode control the following registers are used to control and monitor the operation status when the serial bus interface (sbi) is being operated in clocked-synchronous 8-bit sio mode. serial bus interface 0 control register 1 7 6 5 4 3 2 1 0 bit symbol sios sioinh siom1 siom0 sck2 sck1 sck0 read/write w w w after reset 0 0 0 0 0 0 0 function transfer start 0: stop 1: start continue/ abort transfer 0: continue transfer 1: abort transfer transfer mode select 00: transmit mode 01: (reserved) 10: transmit/receive mode 11: receive mode serial clock selection and reset monitor serial clock selection at write 000 001 010 011 100 101 110 n = 4 n = 5 n = 6 n = 7 n = 8 n = 9 n = 10 1.25 mhz 625 khz 313 khz 156 khz 78.1 khz 39.1 khz 19.5 khz system clock: f sys f sys = 20 mhz (output to sck pin) fscl = [hz] 111 ? external clock: sck0 transfer mode selection 00 8-bit transmit mode 01 (reserved) 10 8-bit transmit/receive mode 11 8-bit receive mode continue/abort transfer 0 continue transfer 1 abort transfer (automatically cleared after transfer aborted) indicate transfer start/stop 0 stop 1start note: set the transfer mode and the serial clock a fter setting to ?0? and to ?1?. serial bus interface 0 data buffer register 7 6 5 4 3 2 1 0 bit symbol db7 db6 db5 db4 db3 db2 db1 db0 read/write r (receiver)/w (transfer) after reset undefined figure 3.10.20 register for the sio mode f sys 2 n sbi0cr1 (1240h) prohibit read- modify- write sbi0dbr (1241h) prohibit read- modify-write
tmp92c820 2007-02-16 92c820-204 serial bus interface 0 control register 2 7 6 5 4 3 2 1 0 bit symbol sbim1 sbim0 ? ? read/write w w w after reset 0 0 0 0 function serial bus interface operation mode selection 00: port mode 01: sio mode 10: i 2 c bus mode 11: (reserved) (note 2) (note 2) serial bus interface operation mode selection 00 port mode (serial bus interface output disabled) 01 clocked-synchronous 8-bit sio mode 10 i 2 c bus mode 11 (reserved) serial bus interface 0 status register 7 6 5 4 3 2 1 0 bit symbol siof sef read/write r after reset 0 0 function serial transfer operation status monitor shift operation status monitor serial transfer operating status monitor shift operation status monitor 0 transfer terminated 0 shift operation terminated 1 transfer in progress 1 shift operation in progress serial bus interface 0 baud rate register 0 7 6 5 4 3 2 1 0 bit symbol ? ? read/write w r/w after reset 0 0 function always write ?0?. always write ?0?. note: clocked-synchronous mode cannot operate in idle2 mode. serial bus interface 0 baud rate register 1 7 6 5 4 3 2 1 0 bit symbol p4en ? read/write w w after reset 0 0 function internal clock 0: stop 1: operate always write ?0?. baud rate clock control 0 stop 1 operate figure 3.10.21 regist ers for the sio mode note 1: set the sbi0cr1 ?000? before switching to a clocked-synchronous 8-bit sio mode. note 2: please always write ?00? to sbicr2<1:0>. sbi0cr2 (1243h) prohibit read- modify- write sbi0sr (1243h) sbi0br0 (1244h) prohibit read- modify- write sbi0br1 (1245h) prohibit read- modify- write
tmp92c820 2007-02-16 92c820-205 (1) serial clock 1. clock source sbi0cr1 is used to se lect the following functions: internal clock in an internal clock mode, any of seven frequencies can be selected. the serial clock is output to the outside on the sck pin. when the device is writing (in the transmit mode) or reading (in the receive mode) data cannot follow the serial cloc k rate, an automatic wait function is executed to stop the serial clock automatically and holds the next shift operation until reading or writing is complete. figure 3.10.22 automatic wait function external clock ( = ?111?) an external clock input via the sck pin is used as the serial clock. in order to ensure the integrity of shift operatio ns, both the high and low-level serial clock pulse widths shown below must be maintained. the maximum data transfer frequency is 1.25 mhz (when f sys = 20 mhz). figure 3.10.23 maximum data transfer frequency when external clock input a 0 3 sck0 pin output 12 78 2 1 6 7 8 1 2 3 so0 pin output a 1 a 5 a 2 a 6 a 7 b 0 b 4 b 1 b 5 b 6 b 7 c 0 c 1 c 2 write transmitted data a b c automatic wait function t sckl sck0 pin t sckl , t sckh > 8 f sys t sckh
tmp92c820 2007-02-16 92c820-206 2. shift edge data is transmitted on the leading edge of the clock and received on the trailing edge. (a) leading edge shift data is shifted on the leading edge of the serial clock (on the falling edge of the sck pin input/output). (b) trailing edge shift data is shifted on the trailing edge of the serial clock (on the rising edge of the sck pin input/output). figure 3.10.24 shift edge ******** sck pin output so pin output bit0 bit1 bit7 shift register 76543210 * 7654321 ** 765432 *** 76543 **** 7654 ***** 765 ****** 76 ******* 7 (a) leading edge sck pin si pin shift register 0 ******* 10 ****** 210 ***** 3210 **** 43210 *** 543210 ** 6543210 * 76543210 (b) trailing edge *: don?t care bit2 bit3 bit4 bit5 bit6 bit0 bit1 bit7 bit2 bit3 bit4 bit5 bit6
tmp92c820 2007-02-16 92c820-207 (2) transfer modes the sbi0cr1 is used to select a transmit, receive or transmit/receive mode. 1. 8-bit transmit mode set a control register to a transmit mo de and write transmission data to the sbi0dbr. after the transmit data has been written, set the sbi0cr1 to ?1? to start data transfer. the transmitted data is transferred from the sbi0dbr to the shift register and output, starting with the least significant bit (lsb), via the so pin and synchronized with the serial clock. when the transmission data has been transferred to the shift register, the sbi0dbr becomes empty. the intsbe0 (buffer empty) interrupt request is generated to request new data. when the internal clock is used, the serial clock will stop and the automatic wait function will be initiated if new data is not loaded to the data buffer register after the specified 8-bit data is transmitted. when new transmission data is written, the automatic wait function is canceled. when the external clock is used, data should be written to the sbi0dbr before new data is shifted. the transfer speed is determined by the maximum delay time between the time when an interrupt request is generated and the time when data is written to the sbi0dbr by the interrupt service program. when the transmit is started, after the sbi0sr goes ?1? output from the so pin holds final bit of the last data until falling edge of the sck. data transmission ends when the is cleared to ?0? by the intsbe0 interrupt service program or when the is set to ?1?. when the is cleared to ?0?, the transmitted mode ends when all data is output. in order to confirm whether data is being transmitted properly by the program, the (bit3 of the sbi0sr) to be sensed. the sbi0sr is cleared to ?0? when transmission has been comple ted. when the is set to ?1?, transmitting data stops. the turns ?0?. when the external clock is used, it is al so necessary to clear the to ?0? before new data is shifted; otherwise, dummy data is transmitted and operation ends.
tmp92c820 2007-02-16 92c820-208 figure 3.10.25 transfer mode example: program to stop data transmission (when an external clock is used) stest1: bit 2, (sbi0sr) ; if = 1 then loop jr nz, stest1 stest2: bit 0, (p9) ; if sck0 = 0 then loop jr z, stest2 ld (sbi0cr1), 00000111b ; 0 (b) external clock clear sck pin (input) write transmitted data so pin intsbe0 interrupt request sbi0dbr b b 7 * (a) internal clock a 2 a 1 a 4 a 3 a 6 a 5 b 0 a 7 b 2 b 1 b 4 b 3 b 6 b 5 a 0 clear sck pin (output) a write transmitted data so pin intsbe0 interrupt request sbi0dbr b 7 * a 2 a 1 a 4 a 3 a 6 a 5 b 0 a 7 b 2 b 1 b 4 b 3 b 6 b 5 a 0 b a
tmp92c820 2007-02-16 92c820-209 figure 3.10.26 transmitted data hold time at end of transmission 2. 8-bit receive mode set the control register to receive mode and set the sbi0cr1 to ?1? for switching to receive mode. data is received into the shift register via the si pin and synchronized with the serial clock, starting from the least significant bit (lsb). when the 8-bit data is received, the data is transferred from the shift register to the sbi0dbr. the intsbe0 (buffer full) interrupt request is generated to request that the received data be read. the data is then read from the sbi0dbr by the interrupt service program. when the internal clock is used, the serial clock will stop and the automatic wait function will be in effect until the received data is read from the sbi0dbr. when the external clock is used, since shift operation is synchronized with an external clock pulse, the received data should be read from the sbi0dbr before the next serial clock pulse is input. if the received data is not read, further data to be received is canceled. the maximum transfer speed when an external clock is used is determined by the delay time be tween the time when an interrupt request is generated and the time when the received data is read. receiving of data ends when the is cleared to ?0? by the intsbe0 interrupt service program or when the is set to ?1?. if is cleared to ?0?, received da ta is transferred to the sbi0dbr in complete blocks. the received mode ends when the transfer is complete. in order to confirm whether data is being received properly by the program, the sbi0sr to be sensed. the is cleared to ?0? when receiving is complete. when it is confirmed that receiving has been completed, the last data is read. when the is set to ?1?, data receiving st ops. the is cleared to ?0?. (the received data becomes invalid, th erefore no need to read it.) note: when the transfer mode is changed, the contents of the sbi0dbr will be lost. if the mode must be changed, conclude dat a receiving by clearing the to ?0?, read the last data, then change the mode. sck pin bit7 bit6 so pin t sodh = 3.5/f sys [s] (min)
tmp92c820 2007-02-16 92c820-210 figure 3.10.27 receiver mode (example: internal clock) 3. 8-bit transmit/receive mode set a control register to a transmit/recei ve mode and write data to the sbi0dbr. after the data is written, set the sbi0cr to ?1? to start transmitting/receiving. when data is transmitted, the data is output from the so pin, starting from the least significant bit (lsb) and synchronized with the leading edge of the serial clock signal. when data is received, the data is input via the si pin on the trailing edge of the serial clock signal. 8-bit data is transferred from the shift register to the sbi0dbr and the intsbe0 interrupt request is generated. the interrupt service program reads the received data from the data buffer register and writes the data which is to be transmitted. the sbi0dbr is used for both transmitting and receiving. transmitted data should always be written after received data is read. when the internal clock is used, the automatic wait function will be in effect until the received data is read and the next data is written. when the external clock is used, since the shift operation is synchronized with the external clock, the received data is read and transmitted data is written before a new shift operation is executed. the maximum transfer speed when the external clock is used is determined by the delay time between the time when an interrupt request is generated and the time at whic h received data is read and transmitted data is written. when the transmit is started, after the sbi0sr goes ?1? output from the so pin holds final bit of the last data until falling edge of the sck. transmitting/receiving data ends when the is cleared to ?0? by the intsbe0 interrupt service program or when the sbi0cr1 is set to ?1?. when the is cleared to ?0?, receiv ed data is transferred to the sbi0dbr in complete blocks. the transmit/receive mode ends when the transfer is complete. in order to confirm whether data is being transmitted/received properly by the program, set the sbi0sr to be sens ed. the is set to ?0? when transmitting/receiving is completed. wh en the is set to ?1?, data transmitting/receiving stops. the is then cleared to ?0?. note: when the transfer mode is changed, the contents of the sbi0dbr will be lost. if the mode must be changed, conclude data transmitting/receiving by clearing the to ?0?, read the last data, then change the transfer mode. b b 7 a 2 a 1 a 4 a 3 a 6 a 5 b 0 a 7 b 2 b 1 b 4 b 3 b 6 b 5 a 0 clear sck pin (output) a read receiver data si pin intsbe0 interrupt request sbi0dbr read receiver data
tmp92c820 2007-02-16 92c820-211 figure 3.10.28 transmit/received mode (example: internal clock) figure 3.10.29 transmitted data hold time at end of transmit/receive * a 7 d b 7 a 2 a 1 a 4 a 3 a 6 a 5 b 0 b 2 b 1 b 4 b 3 b 6 b 5 a 0 clear sck pin (output) b write transmitted data ( b ) so pin intsbe0 interrupt request sbi0dbr c 7 d 7 c 2 c 1 c 4 c 3 c 6 c 5 d 0 d 2 d 1 d 4 d 3 d 6 d 5 c 0 si pin c a read received data (c) write transmitted data ( a ) read received data (d) sck pin bit6 so pin t sodh = 4/f sys [s] (min) bit7 in last transmitted word
tmp92c820 2007-02-16 92c820-212 3.11 analog/digital converter the tmp92c820 incorporates a 10-bit succe ssive approximation-type analog/digital converter (ad converter) with 5-channel analog input. 0h figure 3.11.1 is a block diagram of the ad converter. the 5-channel analog input pins (an0 to an4) are shared with the input-only port (por t g) so they can be used as an input port. note: when idle2, idle1 or stop mode is selected , as to reduce the power, with some timings the system may enter a standby mode even though the internal comparator is still enabled. therefore be sure to check that ad conv erter operations are halted before a halt instruction is executed. figure 3.11.1 block diagram of ad converter internal data bus ad mode control register 0 admod0 ad mode control register 1, 2 admod1, admod2 ad converter control circuit scan re p eat interru p t busy end start adtrg ad conversion result register adreg0l to adreg4l adreg0h to adreg4h da converter sample and hold multi- plexer decoder channel select an4 (pg4) an3/adtrg (pg3) an2 (pg2) an1 (pg1) an0 (pg0) vrefh vrefl intad interrupt a nalog input comparator
tmp92c820 2007-02-16 92c820-213 3.11.1 analog/digital converter registers the ad converter is controlled by the th ree ad mode control registers: admod0, admod1 and admod2. the five ad conversion data result registers (adreg0h/l to adreg4h/l) store the results of ad conversion. 1h figure 3.11.2 shows the registers related to the ad converter. ad mode control register 0 7 6 5 4 3 2 1 0 bit symbol eocf adbf ? ? itm0 repeat scan ads read/write r r/w after reset 0 0 0 0 0 0 0 0 function ad conversion end flag 0: conversion in progress 1: conversion complete ad conversion busy flag 0: conversion stopped 1: conversion in progress always write ?0?. always write ?0?. interrupt specification in conversion channel fixed repeat mode 0: every conversion 1: every fourth conversion repeat mode specification 0: single conversion 1: repeat conversion mode scan mode specification 0: conversion channel fixed mode 1: conversion channel scan mode ad conversion start 0: don?t care 1: start conversion always 0 when read ad conversion start 0 don?t care 1 start ad conversion note: always read as 0. ad scan mode setting 0 ad conversion channel fixed mode 1 ad conversion channel scan mode ad repeat mode setting 0 ad single conversion mode 1 ad repeat conversion mode specify ad conversion interrupt for channel fixed repeat conversion mode channel fixed repeat conversion mode = ?0?, = ?1? 0 generates interrupt every conversion. 1 generates interrupt every fourth conversion. ad conversion busy flag 0 ad conversion stopped 1 ad conversion in progress ad conversion end flag 0 before or during ad conversion 1 ad conversion complete figure 3.11.2 ad converter related register a dmod0 (12b8h)
tmp92c820 2007-02-16 92c820-214 ad mode control register 1 7 6 5 4 3 2 1 0 bit symbol vrefon i2ad ? ? ? adch2 adch1 adch0 read/write r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function vref application 0: off 1: on idle2 0: stop 1: operate always write ?0?. always write ?0?. always write ?0?. analog input channel selection analog input channel selection 0 channel fixed 1 channel scanned 000 an0 an0 001 an1 an0 an1 010 an2 an0 an1 an2 011 (note) an3 an0 an1 an2 an3 100 (note) an4 an0 an1 an2 an3 an4 idle2 control 0 stopped 1 in operation control of application of reference voltage to ad converter 0off 1on before starting conversion (before writing 1 to admod0), set the bit to 1. ad mode control register 2 7 6 5 4 3 2 1 0 bit symbol adtrge read/write r/w after reset 0 function ad external trigger start control 0: disable 1: enable ad conversion start control by external trigger ( adtrg input) 0 disabled 1 enabled note: as pin an3 also function as the adtrg input pin, do not set = ?011, 100? when using adtrg with set to ?1?. figure 3.11.3 ad converter related register a dmod1 (12b9h) a dmod2 (12bah)
tmp92c820 2007-02-16 92c820-215 ad conversion result register 0 low 7 6 5 4 3 2 1 0 bit symbol adr01 adr00 adr0rf read/write r r after reset undefined 0 function stores lower 2 bits of ad conversion result. ad conversion data storage flag 1: conver- sion result stored ad conversion result register 0 high 7 6 5 4 3 2 1 0 bit symbol adr09 adr08 adr07 adr06 adr05 adr04 adr03 adr02 read/write r after reset undefined function stores upper eight bi ts ad conversion result. ad conversion result register 1 low 7 6 5 4 3 2 1 0 bit symbol adr11 adr10 adr1rf read/write r r after reset undefined 0 function stores lower 2 bits of ad conversion result. ad conversion result flag 1: conver- sion result stored ad conversion result register 1 high 7 6 5 4 3 2 1 0 bit symbol adr19 adr18 adr17 adr16 adr15 adr14 adr13 adr12 read/write r after reset undefined function stores upper eight bits of ad conversion result. 9 8 76543210 channel x conversion result 7 6 543210 76543 2 1 0 figure 3.11.4 ad converter related registers a dregxh adregxl ? bits 5 to 1 are always read as 1. ? bit0 is the ad conversion data storage flag . when the ad conversion result is stored, the flag is set to 1. when either of the registers (adregxh, adregxl) is read, the flag is cleared to 0. a dreg0l (12a0h) a dreg0h (12a1h) a dreg1l (12a2h) a dreg1h (12a3h)
tmp92c820 2007-02-16 92c820-216 ad conversion result register 2 low 7 6 5 4 3 2 1 0 bit symbol adr21 adr20 adr2rf read/write r r after reset undefined 0 function stores lower 2 bits of ad conversion result. ad conversion data storage flag 1: conver- sion result stored ad conversion result register 2 high 7 6 5 4 3 2 1 0 bit symbol adr29 adr28 adr27 adr26 adr25 adr24 adr23 adr22 read/write r after reset undefined function stores upper eight bits of ad conversion result. ad conversion result register 3 low 7 6 5 4 3 2 1 0 bit symbol adr31 adr30 adr3rf read/write r r after reset undefined 0 function stores lower 2 bits of ad conversion result. ad conversion data storage flag 1: conver- sion result stored ad conversion result register 3 high 7 6 5 4 3 2 1 0 bit symbol adr39 adr38 adr37 adr36 adr35 adr34 adr33 adr32 read/write r after reset undefined function stores upper eight bits of ad conversion result. 9 8 76543210 channel x conversion result 7 6 543210 76543 2 1 0 figure 3.11.5 ad converter related registers a dregxh adregxl ? bits 5 to 1 are always read as 1. ? bit0 is the ad conversion data storage flag . when the ad conversion result is stored, the flag is set to 1. when either of the registers (adregxh, adregxl) is read, the flag is cleared to 0. a dreg2l (12a4h) a dreg2h (12a5h) a dreg3l (12a6h) a dreg3h (12a7h)
tmp92c820 2007-02-16 92c820-217 ad conversion result register 4 low 7 6 5 4 3 2 1 0 bit symbol adr41 adr40 adr4rf read/write r r after reset undefined 0 function stores lower 2 bits of ad conversion result. ad conversion data storage flag 1: conver- sion result stored ad conversion result register 4 high 7 6 5 4 3 2 1 0 bit symbol adr49 adr48 adr47 adr46 adr45 adr44 adr43 adr42 read/write r after reset undefined function stores upper eight bits of ad conversion result. 9 8 76543210 channel x conversion result 7 6 543210 76543 2 1 0 figure 3.11.6 ad converter related registers a dregxh adregxl ? bits 5 to 1 are always read as 1. ? bit0 is the ad conversion data storage flag . when the ad conversion result is stored, the flag is set to 1. when either of the registers (adregxh, adregxl) is read, the flag is cleared to 0. a dreg4l (12a8h) a dreg4h (12a9h)
tmp92c820 2007-02-16 92c820-218 3.11.2 description of operation (1) analog reference voltage a high-level analog reference voltage is a pplied to the vrefh pin; a low-level analog reference voltage is applied to the vrefl pin. to perform ad conversion, the reference voltage, the difference between vrefh and vrefl, is divided by 1024 using string resistance. the result of the division is then compared with the analog input voltage. to turn off the switch between vrefh and vrefl, write a 0 to admod1 in ad mode control register 1. to start ad conversion in the off state, first write a 1 to admod1, wait 3 s until the internal reference voltage stabilizes (this is not related to fc.), then set admod0 to 1. (2) analog input channel selection the analog input channel selection varies depends on the operation mode of the ad converter. ? in analog input channel fixed mode (admod0 = 0) setting admod1 selects one of the input pins an0 to an4 as the input channel. ? in analog input channel scan mode (admod0 = 1) setting admod1 selects one of the five scan modes. 2h table 3.11.1 illustrates analog input channel selection in each operation mode. on a reset, admod0 is set to 0 and admod1 is initialized to 000. thus pin an0 is selected as the fixed input channel. pi ns not used as analog input channels can be used as standard input port pins. table 3.11.1 analog input channel selection channel fixed = ?0? channel scan = ?1? 000 an0 an0 001 an1 an0 an1 010 an2 an0 an1 an2 011 an3 an0 an1 an2 an3 100 an4 an0 an1 an2 an3 an4
tmp92c820 2007-02-16 92c820-219 (3) starting ad conversion to start ad conversion, write a 1 to admod0 in ad mode control register ?0? or admod2 in ad mode control register 2, and input falling edge on adtrg pin. when ad conversion starts, the ad conversion busy flag admod0 will be set to 1, indicating that ad conversion is in progress. during a/d conversion, a falling edge input on the adtrg pin will be ignored. (4) ad conversion modes and the ad conversion end interrupt the four ad conversion modes are: ? channel fixed single conversion mode ? channel scan single conversion mode ? channel fixed repeat conversion mode ? channel scan repeat conversion mode the admod0 and admod0 settings in ad mode control register 0 determine the ad mode setting. completion of ad conversion triggers an intad ad conversion end interrupt request. also, admod0 will be set to 1 to indicate that ad conversion has been completed. a. channel fixed single conversion mode setting admod0 and admod0 to 00 selects conversion channel fixed single conversion mode. in this mode data on one specified channel is converted once only. when the conversion has been completed, the admod0 flag is set to 1, admod0 is cleared to 0, and an intad interrupt request is generated. b. channel scan single conversion mode setting admod0 and admod0 to 01 selects conversion channel scan single conversion mode. in this mode data on the specified scan channels is converted once only. when scan conversion has been completed, admod0 is set to 1, admod0 is cleared to 0, and an intad interrupt request is generated.
tmp92c820 2007-02-16 92c820-220 c. channel fixed repeat conversion mode setting admod0 and admod0 to 10 selects conversion channel fixed repeat conversion mode. in this mode data on one specified channel is converted repeatedly. when conversion has been completed, admod0 is set to 1 and admod0 is not cleared to 0 but held at 1. intad interrupt request generation timing is determined by the setting of admod0. setting to 0 generates an interrupt request every time an ad conversion is completed. setting to 1 generates an interrupt request on completion of every fourth conversion. d. channel scan repeat conversion mode setting admod0 and admod0 to 11 selects conversion channel scan repeat conversion mode. in this mode data on the specified scan channels is converted repeatedly. when each scan conversion has been complete d, admod0 is set to 1 and an intad interrupt request is generated. admod0 is not cleared to 0 but held at 1. to stop conversion in a repeat conversion mode (e.g., in cases c. and d.), write a 0 to admod0. after the current conversion has been completed, the repeat conversion mode terminates and admod0 is cleared to 0. switching to a halt state (idle2 mode with admod1 cleared to 0, idle1 mode or stop mode) immediately stops operation of the ad converter even when ad conversion is still in progress. in repeat conversion modes (e.g., in cases c. and d.), when the halt is released, conversion restarts from the beginning. in single conversion modes (e.g., in cases a. and b.), conversion does not restart when the halt is released (the converter remains stopped). 3h table 3.11.2 shows the relationship between the ad conversion modes and interrupt requests. table 3.11.2 relationship between ad conversion modes and interrupt requests admod0 mode interrupt request generation channel fixed single conversion mode after completion of conversion x 0 0 channel scan single conversion mode after completion of scan conversion x 0 1 every conversion 0 channel fixed repeat conversion mode every 4th conversion 1 1 0 channel scan repeat conversion mode after completion of every scan conversion x 1 1 x: don?t care
tmp92c820 2007-02-16 92c820-221 (5) ad conversion time 132 state (6.6 s at f sys = 20 mhz) are required for the ad conversion of one channel. (6) storing and reading the results of ad conversion the ad conversion data upper and lowe r registers (adreg0h /l to adreg4h/l) store the results of ad conversion. (adreg0h/l to adreg4h/l are read-only registers.) in channel fixed repeat conversion mode, the conversion results are stored successively in registers adreg0h/l to adreg3h/l. in other modes the an0, an1, an2, an3, an4 conversion results are stored in adreg0h/l, adreg1h/l, adreg2h/l, adreg3h/l and adreg4h/l respectively. 4h table 3.11.3 shows the correspondence between the analog input channels and the registers which are used to hold the results of ad conversion. table 3.11.3 correspondence between analog input channels and ad conversion result registers ad conversion result register analog input channel (port g) conversion modes other than at right channel fixed repeat conversion mode ( = 1) an0 adreg0h/l an1 adreg1h/l an2 adreg2h/l an3 adreg3h/l an4 adreg4h/l , bit0 of the ad conversion data lower register, is used as the ad conversion data storage flag. the storage flag indicates whether the ad conversion result register has been read or not. when a conversion result is stored in the ad conversion result register, the flag is set to 1. when either of the ad conversion result registers (adregxh or adregxl) is read, the flag is cleared to 0. reading the ad conversion result also clears the ad conversion end flag admod0 to 0. a dreg0h/l a dreg1h/l a dreg2h/l a dreg3h/l
tmp92c820 2007-02-16 92c820-222 setting example: 1. convert the analog input voltage on the an3 pin and write the result, to memory address 0800h using the ad interrupt (intad) processing routine. main routine: 7 6 5 4 3 210 inte0ad 1 1 0 0 ? ? ? ? enable intad and set it to interrupt level 4. admod1 1 1 0 0 0 0 1 1 set pin an3 to be the analog input channel. admod0 ? ? 0 0 0 0 0 1 start conversion in channel fi xed single conversion mode. interrupt routine processing example: wa adreg3 read value of adreg3l and adreg3h into 16-bit general-purpose register wa. wa > > 6 shift contents read into wa 6 times to right and zero-fill upper bits. (0800h) wa write contents of wa to memory address 0800h. 2. this example repeatedly converts the analog input voltages on the three pins an0, an1 and an2, using channel scan repeat conversion mode. inte0ad 1 0 0 0 ? ? ? ? disable intad. admod1 1 1 0 0 0 0 1 0 set pins an0 to an2 to be the analog input channels. admod0 ? ? 0 0 0 1 1 1 start conversion in channel scan repeat conversion mode. x: don?t care, (: no change
tmp92c820 2007-02-16 92c820-223 3.12 watchdog timer (runaway detection timer) the tmp92c820 contains a watchdog timer of runaway detecting. the watchdog timer (wdt) is used to return the cpu to the normal state when it detects that the cpu has started to malfunction (runaway) due to causes such as noise. when the watchdog timer detects a malfunction, it generates a non-maskable interrupt intwd to notify the cpu of the malfunction. connecting the watchdog timer output to the reset pin internally forces a reset. (the level of external reset pin is not changed.) 3.12.1 configuration 0h figure 3.12.1 is a block diagram of the watchdog timer (wdt). figure 3.12.1 block diagram of watchdog timer note: care must be exercised in the overall design of the apparatus since the watchdog timer may fail to function correctly due to external noise, etc. wdmod reset selector 2 15 2 17 2 19 2 21 binary counter (22 stages) q r s wdt control register wdcr write b1h write 4eh reset control wdmod internal reset intwd interrupt internal reset f io wdmod internal data bus reset
tmp92c820 2007-02-16 92c820-224 3.12.2 operation the watchdog timer generates an intwd inte rrupt when the detection time set in the wdmod has elapsed. the watchdog time r must be cleared to zero in software before an intwd interrupt will be generated. if the cpu malfunctions (e.g., if runaway occurs) due to causes such as noise, but does not execute the instruction used to clear the binary counter, the binary counter will overflow and an intwd interrupt will be generated. the cpu will detect malfunction (runaway) due to the intwd interrupt, and in this case it is possible to return the cpu to normal op eration by means of an anti-malfunction program. the watchdog timer begins operating immediately on release of the watchdog timer reset. the watchdog timer is reset and halted in idle1 or stop mode. the watchdog timer counter continues counting during bus release (when busak goes low). when the device is in idle2 mode, the operation of the wdt depends on the wdmod setting. ensure that wdmod is set before the device enters idle2 mode. the watchdog timer consists of a 22-stage binary counter which uses the clock f sys as the input clock. the binary counter can output 2 15 /f io , 2 17 /f io , 2 19 /f io and 2 21 /f io . figure 3.12.2 normal mode the runaway detection result can also be connected to the reset pin internally. in this case, the reset time will be between 44 and 58 system clocks (35.2 to 46.4 s at f osch = 40 mhz) as shown in 1h figure 3.12.3. after a reset, the f io clock (1 cycle = 1 state) is f fph /4, where f fph is generated by dividing th e high-speed oscillator clock (f osch ) by sixteen through the clock gear function figure 3.12.3 reset mode 44 to 58 system clocks (35.2 to 46.4 s at f sys = 20 mhz) n wdt counte r wdt interru p t overflow internal reset overflow n 0 wdt counte r wdt interru p t wdt clea r (software) write clear code
tmp92c820 2007-02-16 92c820-225 3.12.3 control registers the watchdog timer wdt is controlled by two control registers wdmod and wdcr. (1) watchdog timer mode register (wdmod) a. setting the detection time for the watchdog timer in this 2-bit register is used for setting the watchdog timer interrupt time used when detecting runaway. on a reset this register is initialized to wdmod = 00. the detection times for wdt is 2 15 /f io [s]. (the number of system clocks is approximately 65,536.) b. watchdog timer enable/disable control register at reset, the wdmod is initialized to 1, enabling the watchdog timer. to disable the watchdog timer, it is necessa ry to set this bit to 0 and to write the disable code (b1h) to the watchdog time r control register wdcr. this makes it difficult for the watchdog timer to be disabled by runaway. however, it is possible to return the watchdog timer from the disabled state to the enabled state merely by setting to 1. c. watchdog timer out reset connection this register is used to connect the output of the watchdog timer with the reset terminal internally. since wdmod is initialized to 0 at reset, a reset by the watchdog timer will not be performed. (2) watchdog timer control register (wdcr) this register is used to disable and clear the binary counter for the watchdog timer. ? disable control the watchdog timer can be disabled by clearing wdmod to 0 and then writing the disable code (b1h) to the wdcr register. wdcr 0 1 0 0 1 110 write the clear c ode (4eh). wdmod 0 ? ? x 0 ? ? 0 clear wdmod to 0. wdcr 1 0 1 1 0 0 0 1 write the disable code (b1h). ? enable control set wdmod to 1. ? watchdog timer clear control to clear the binary counter and cause count ing to resume, write the clear code (4eh) to the wdcr register. wdcr 0 1 0 0 1 1 1 0 write the clear code (4eh). note1: if the disable control is used, set the disable c ode (b1h) to wdcr after writing the clear code (4eh) once. (please refer to setting example.) note2: if the watchdog timer setting is changed, change setting after setting to di sable condition once.
tmp92c820 2007-02-16 92c820-226 7 6 5 4 3 2 1 0 bit symbol wdte wdtp1 wdtp0 ? i2wdt rescr ? read/write r/w r/w after reset 1 0 0 0 0 0 0 function wdt control 1: enable select detecting time 00: 2 15 /f io 01: 2 17 /f io 10: 2 19 /f io 11: 2 21 /f io always write ?0?. idle2 0: stop 1: operate 1: internally connects wdt out to the reset pin always write ?0?. watchdog timer out control 0 ? 1 connects wdt out to a reset idle2 control 0 stop 1 operation watchdog timer detection time 00 2 15 /f io (approximately 3.28 ms at f osch = 40 mhz) 01 2 17 /f io (approximately 13.1 ms at f osch = 40 mhz) 10 2 19 /f io (approximately 52.4 ms at f osch = 40 mhz) 11 2 21 /f io (approximately 210 ms at f osch = 40 mhz) watchdog timer enable/disable control 0 disabled 1 enabled figure 3.12.4 watchdog timer mode register 7 6 5 4 3 2 1 0 bit symbol ? read/write w after reset ? function b1h: wdt disable code 4eh: wdt clear code wdt disable/clear control b1h disable code 4eh clear code others ? figure 3.12.5 watchdog timer control register wdcr (1301h) prohibit read- modify- write wdmod (1300h)
tmp92c820 2007-02-16 92c820-227 3.13 real time clock (rtc) 3.13.1 function description for rtc (1) clock function (hour, minute, second) (2) calendar function (month and day, day of the week, and leap year) (3) 24 or 12-hour (am/pm) clock function (4) 30 second adjustment function (by software) (5) alarm function (alarm output) (6) alarm interrupt generate (7) divided power supply 3.13.2 block diagram figure 3.13.1 rtc block diagram note 1: western calendar year column: this product uses only the final two digits of t he year. therefore, the year following 99 is 00 years. in use, please take into account the fi rst two digits when handling years in the western calendar. note 2: leap year: a leap year is divisible by 4, but the exception is any leap year whic h is divisible by 100; this is not considered a leap year. however, any year which is divisible by 400, is a leap year. this product does not take into account the above exc eptions . since this product accounts only for leap years divisible by 4, please adj ust the system for any problems. divider 32 khz clock alarm register comparator clock carry hold (1s) alarm select adjust read/write control 16 hz clock 1 hz clock alarm alarm intrtc data bus address bus address d0 to d7 wr rd
tmp92c820 2007-02-16 92c820-228 3.13.3 detailed explanation of control register rtc is not initialized by system reset. therefore, all registers must be initialized at the beginning of the program. (1) second column register (for page0 only) 7 6 5 4 3 2 1 0 bit symbol se6 se5 se4 se3 se2 se1 se0 secr (1320h) read/write r/w after reset undefined function "0" is read. 40 sec. column 20 sec. column 10 sec. column 8 sec. column 4 sec. column 2 sec. column 1 sec. column 0 0 0 0 0 0 0 0 sec 0 0 0 0 0 0 1 1 sec 0 0 0 0 0 1 0 2 sec 0 0 0 0 0 1 1 3 sec 0 0 0 0 1 0 0 4 sec 0 0 0 0 1 0 1 5 sec 0 0 0 0 1 1 0 6 sec 0 0 0 0 1 1 1 7 sec 0 0 0 1 0 0 0 8 sec 0 0 0 1 0 0 1 9 sec 0 0 1 0 0 0 0 10 sec : 0 0 1 1 0 0 1 19 sec 0 1 0 0 0 0 0 20 sec : 0 1 0 1 0 0 1 29 sec 0 1 1 0 0 0 0 30 sec : 0 1 1 1 0 0 1 39 sec 1 0 0 0 0 0 0 40 sec : 1 0 0 1 0 0 1 49 sec 1 0 1 0 0 0 0 50 sec : 1 0 1 1 0 0 1 59 sec note: do not set data other than as shown above.
tmp92c820 2007-02-16 92c820-229 (2) minute column register (for page0/1) 7 6 5 4 3 2 1 0 bit symbol mi6 mi5 mi4 mi3 mi2 mi1 mi0 minr (1321h) read/write r/w after reset undefined function ?0? is read. 40 min column 20 min column 10 min column 8 min column 4 min column 2 min column 1 min column 0 0 0 0 0 0 0 0 min 0 0 0 0 0 0 1 1 min 0 0 0 0 0 1 0 2 min 0 0 0 0 0 1 1 3 min 0 0 0 0 1 0 0 4 min 0 0 0 0 1 0 1 5 min 0 0 0 0 1 1 0 6 min 0 0 0 0 1 1 1 7 min 0 0 0 1 0 0 0 8 min 0 0 0 1 0 0 1 9 min 0 0 1 0 0 0 0 10 min : 0 0 1 1 0 0 1 19 min 0 1 0 0 0 0 0 20 min : 0 1 0 1 0 0 1 29 min 0 1 1 0 0 0 0 30 min : 0 1 1 1 0 0 1 39 min 1 0 0 0 0 0 0 40 min : 1 0 0 1 0 0 1 49 min 1 0 1 0 0 0 0 50 min : 1 0 1 1 0 0 1 59 min note: do not set data other than as shown above.
tmp92c820 2007-02-16 92c820-230 (3) hour column register (for page0/1) 1. in 24-hour clock mode (monthr = ?1?) 7 6 5 4 3 2 1 0 bit symbol ho5 ho4 ho3 ho2 ho1 ho0 hourr (1322h) read/write r/w after reset undefined function ?0? is read. 20 hours column 10 hours column 8 hours column 4 hours column 2 hours column 1 hour column 0 0 0 0 0 0 0 o?clock 0 0 0 0 0 1 1 o?clock 0 0 0 0 1 0 2 o?clock : 0 0 1 0 0 0 8 o?clock 0 0 1 0 0 1 9 o?clock 0 1 0 0 0 0 10 o?clock : 0 1 1 0 0 1 19 o?clock 1 0 0 0 0 0 20 o?clock : 1 0 0 0 1 1 23 o?clock note: do not set data other than as shown above. 2. in 12-hour clock mode (monthr = ?0?) 7 6 5 4 3 2 1 0 bit symbol ho5 ho4 ho3 ho2 ho1 ho0 hourr (1322h) read/write r/w after reset undefined function ?0? is read. pm/am 10 hours column 8 hours column 4 hours column 2 hours column 1 hour column 0 0 0 0 0 0 0 o?clock (am) 0 0 0 0 0 1 1 o?clock 0 0 0 0 1 0 2 o?clock : 0 0 1 0 0 1 9 o?clock 0 1 0 0 0 0 10 o?clock 0 1 0 0 0 1 11 o?clock 1 0 0 0 0 0 0 o?clock (pm) 1 0 0 0 0 1 1 o?clock note: do not set data other than as shown above.
tmp92c820 2007-02-16 92c820-231 (4) day of the week column register (for page0/1) 7 6 5 4 3 2 1 0 bit symbol we2 we1 we0 dayr (1323h) read/write r/w after reset undefined function ?0? is read. w2 w1 w0 0 0 0 sunday 0 0 1 monday 0 1 0 tuesday 0 1 1 wednesday 1 0 0 thursday 1 0 1 friday 1 1 0 saturday note: do not set data other than as shown above. (5) day column register (page0/1) 7 6 5 4 3 2 1 0 bit symbol da5 da4 da3 da2 da1 da0 dater (1324h) read/write r/w after reset undefined function ?0? is read. day 20 day 10 day 8 day 4 day 2 day 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1st day 0 0 0 0 1 0 2nd day 0 0 0 0 1 1 3rd day 0 0 0 1 0 0 4th day : 0 0 1 0 0 1 9th day 0 1 0 0 0 0 10th day 0 1 0 0 0 1 11th day : 0 1 1 0 0 1 19th day 1 0 0 0 0 0 20th day : 1 0 1 0 0 1 29th day 1 1 0 0 0 0 30th day 1 1 0 0 0 1 31st day note1: do not set data other than as shown above. note2: do not set for non-existent days (e.g.: 30th feb).
tmp92c820 2007-02-16 92c820-232 (6) month column register (for page0 only) 7 6 5 4 3 2 1 0 bit symbol mo4 mo4 mo2 mo1 mo0 monthr (1325h) read/write r/w after reset undefined function ?0? is read. 10 months 8 months 4 months 2 months 1 month 0 0 0 0 1 january 0 0 0 1 0 february 0 0 0 1 1 march 0 0 1 0 0 april 0 0 1 0 1 may 0 0 1 1 0 june 0 0 1 1 1 july 0 1 0 0 0 august 0 1 0 0 1 september 1 0 0 0 0 october 1 0 0 0 1 november 1 0 0 1 0 december note: do not set data other than as shown above. (7) select 24-hour clock or 12 -hour clock (for page1 only) 7 6 5 4 3 2 1 0 bit symbol mo0 monthr (1325h) read/write r/w after reset undefined function ?0? is read. 1: 24-hour 0: 12-hour
tmp92c820 2007-02-16 92c820-233 (8) year column register (for page0 only) 7 6 5 4 3 2 1 0 bit symbol ye7 ye6 ye5 ye4 ye3 ye2 ye1 ye0 yearr (1326h) read/write r/w after reset undefined function 80 years 40 years 20 years 10 years 8 years 4 years 2 years 1 year 0 0 0 0 0 0 0 0 00 years 0 0 0 0 0 0 0 1 01 years 0 0 0 0 0 0 1 0 02 years 0 0 0 0 0 0 1 1 03 years 0 0 0 0 0 1 0 0 04 years 0 0 0 0 0 1 0 1 05 years : 1 0 0 1 1 0 0 1 99 years note: do not set data other than as shown above. (9) leap year register (for page1 only) 7 6 5 4 3 2 1 0 bit symbol leap1 leap0 yearr (1326h) read/write r/w after reset undefined function ?0? is read. 00: leap year 01: one year after leap year 10: two years after leap year 11: three years after leap year 0 0 current year is a leap year 01 current year is the year following a leap year 10 current year is two years after a leap year 11 current year is three years after a leap year
tmp92c820 2007-02-16 92c820-234 (10) setting page register (for page0/1) 7 6 5 4 3 2 1 0 bit symbol intena adjust enatmr enaalm page pager (1327h) read/write r/w w r/w r/w after reset 0 undefined undefined undefined read-modify-write instruction is prohibited. function intrtc 0: disable 1: enable ?0? is read. 0: don?t care 1: adjust clock 0: disable 1: enable alarm 0: disable 1: enable ?0? is read. page selection note: please keep the setting order below of , and . set different times for clock/alarm setting and interrupt setting. (example) clock setting/alarm setting ld (pager), 0ch : clock, alarm enable ld (pager), 8ch : interrupt enable 0 select page0 page 1 select page1 0 don?t care adjust 1 adjust sec. counter. when this bit is set to ?1? the sec. counter becomes ?0? when the value of the sec. counter is 0 ? 29. when the value of the sec. counter is 30-59, the min. counter is carried and sec. counter becomes "0". output adjust signal during 1 cycle of f sys . after being adjusted once, adjust is released automatically. (page0 only) (11) setting reset register (for page0/1) 7 6 5 4 3 2 1 0 bit symbol dis1hz dis16hz rsttmr rstalm ? ? ? ? restr (1328h) read/write w after reset undefined read-modify write-instructio n is prohibited. function 1hz 0: enable 1: disable 16hz 0: enable 1: disable 1:clock reset 1: alarm reset always write ?0? 0 unused rstalm 1 reset alarm register 0 unused rsttmr 1 reset counter (pager) source signal 1 1 1 alarm 0 1 0 1hz 1 0 0 16hz others output ?0?
tmp92c820 2007-02-16 92c820-235 3.13.4 operational description (1) reading clock data 1. using 1hz interrupt 1hz interrupt and the count up of internal data synchronize. therefore, data can read correctly if reading da ta after 1hz interrupt occurred. 2. using two times reading there is a possibility of incorrect clock data reading when the internal counter carries over. to ensure correct data read ing, please read twice, as follows: figure 3.13.2 flowchart of clock data read start end pager = ?0? , select page0 read the clock data (1st) read the clock data (2nd) 1st data = 2nd data no yes
tmp92c820 2007-02-16 92c820-236 (2) writing clock data when a carry over occurs during a write operation, the data cannot be written correctly. please use the following method to ensure data is written correctly. 1. using 1hz interrupt 1hz interrupt and the count up of internal data synchronize. therefore, data can write correctly if writing data after 1hz interrupt occurred. 2. resetting a counter there are 15-stage counter inside the rtc, which generate a 1hz clock from 32,768 khz. the data is written after reset this counter. however, if clearing the counter, it is count ed up only first writing at half of the setting time, first writing only. therefore, if setting the clock counter correctly, after clearing the counter, set the 1hz-in terrupt to enable. and set the time after the first interrupt (occurs at 0.5hz) is occurred. figure 3.13.3 flowchart of data write start end pager = ?0? , select page0 restr = ?1? reset counter restr = ?0? enable 1hz interrupt first interrupts occu r ( after 0.5s ) no yes sets the time
tmp92c820 2007-02-16 92c820-237 2. disabling the clock a clock carry over is prohibited when ?0? is written to pager in order to prevent malfunction caused by the carry hold circuit. while the clock is prohibited, the carry hold circuit holds a one sec. carry signal from a divider. when the clock becomes enabled, the carry signal is output to the clock, the time is revised and operation continues. however, the clock is delayed when clock-disabled state continue s for one second or more. note that at this time system power is down while the clock is disabled. . in this case the clock is stopped and clock is delayed. figure 3.13.4 flowchart of clock disable start end disable the clock read the clock data enable the clock
tmp92c820 2007-02-16 92c820-238 3.13.5 explanation of the interrupt signal and alarm signal the alarm function used by setting the page1 register and outputting either of the following three signals from alarm pin by writing ?1? to pager. intrtc outputs a 1-shot pulse when the falling edge is detected. rtc is not initialized by reset. therefore, when the clock or alarm function is used, clear interrupt request flag in intc (interrupt controller). (1) when the alarm register and the clock correspond, output ?0?. (2) 1hz output clock . (3) 16hz output clock. (1) when the alarm register and the clock correspond, output ?0? when pager= ?1?, and the value of page0 clock corresponds with page1 alarm register, output ?0? to alarm pin and generate intrtc. the methods for using the alarm are as follows: initialization of alarm is done by writing ?1? to restr. all alarm settings become don?t care. in this case, th e alarm always corresponds with value of the clock, and if pager is ?1?, intrtc interrupt request is generated. setting alarm min., alarm hour, alarm date an d alarm day is done by writing data to the relevant page1 register. when all setting contents correspond, rtc generates an intrtc interrupt if pager is ?1?. however, contents which have not been set up (don't care state) are always considered to correspond. contents which have already been set up, cannot be returned independently to the don't care state. in this case, the alarm mu st be initialized and alarm register reset. the following is an example program for outputting an alarm from alarm -pin at noon (pm12:00) every day. ld (pager), 09h ; alarm disable, setting page1 ld (restr), d0h ; alarm initialize ld (dayr), 01h ; w0 ld (datar),01h 1 day ld (hourr), 12h ; setting 12 o?clock ld (minr), 00h ; setting 00 min ; set up time 31 s (note) ld (pager), 0ch ; alarm enable ( ld (pager), 8ch ; interrupt enable ) when the cpu is operating at high frequency oscillation, it may take a maximum of one clock at 32 khz (about 30us) for the time register setting to become valid. in the above example, it is necessary to set 31us of set up time between setting the time register and enabling the alarm register. note: this set up time is unnecessary w hen you use only internal interruption.
tmp92c820 2007-02-16 92c820-239 (2) with 1hz output clock rtc outputs a clock of 1hz to alarm pin by setting up pager= ?0?, restr= ?0?, = ?1?. rtc also generates an intrc interrupt on the falling edge of the clock. (3) with 16hz output clock rtc outputs a clock of 16hz to alarm pin by setting up pager= ?0?, restr= ?1?, = ?0?. rtc also generates intrc an interrupt on the falling edge of the clock.
tmp92c820 2007-02-16 92c820-240 3.14 lcd controller (lcdc) the tmp92c820 incorporates two types liquid cry stal display driving circuit for controlling lcd driver lsi. one circuit handles a ram built-in type lcd driver that can store display data in the lcd driver itself, and the other circuit handles a shift-register type lcd driver that must serially transfer the display data to lcd driver for each display picture. ? shift-register type lcd driver control mode (sr mode) set the mode of operation, start address of sour ce data save memory and lcd size to control register before setting start re gister. after set start register lcdc outputs bus release request to cpu and read data from sou rce memory. after that lcdc tran smits data of volume of lcd size to external lcd driver through data bus. at this time, control signals connected lcd driver output specified waveform synchronizes with data transmission. after finish data transmission , lcdc cancels the bus release request and cpu will re-start. as the display ram, sdram burst mode can be used in tmp92c820. ? ram built-in type lcd driver control mode (ram mode) data transmission to lcd driver is ex ecuted by move instruction of cpu. after setting mode of operation to control register, when moves instruction of cpu is executed, lcdc outputs chip select signal to lcd driver connected to the outside from control pin (d1bscp etc). therefore control of data transmission numbers corresponding to lcd size is controlled by instruction of cpu. this section is constituted as follows. 3.14.1 feature of lcdc of each mode 3.14.2 block diagram 3.14.3 sfrs 3.14.4 shift register type lcd driver control mode (sr mode) 3.14.4.1 operation 3.14.4.2 grayscale mode indication 3.14.4.3 memory mapping 3.14.4.4 hardware cursor 3.14.4.5 frame signal settlement 3.14.4.6 timing charts of interpreting memory codes 3.14.4.7 examples to use 3.14.4.8 sample program 3.14.5 ram built-in type lcd driver control mode (ram mode) 3.14.5.1 operation 3.14.5.2 examples to use 3.14.5.3 sample program
tmp92c820 2007-02-16 92c820-241 3.14.1 feature of lcdc of each mode each feature and operation of pin is as follows. table 3.14.1 feature of lcdc of each mode shift-register type lcd driver control mode ram built-in type lcd driver control mode the number of picture elements can be handled common (row): 128, 160, 200, 240, 320, 400, 480 segment (column): 128, 160, 240, 320, 400, 480, 560, 640 there is not a limitation transfer data bus width 32 bits or 16 bits 8 bits fixed internal ram not allow to use allow to use transfer rate (at f sys = 20 [mhz]) 50 ns/1 word at sdram/burst 100 ns/1 word at sram ? lcd data bus: ld7 to ld0 pin data bus: connect to data input pin of column driver. not used data bus: d7 to d0 pin not used data bus: connect to data input pin of lcd driver. bus state: r/w pin not used bus state: connect with /wr pin of column/row driver. address bus: a0 pin not used address 0: connect with d/i pin of column driver. when a0 = 1 data bus value means display data, when a0 = 0 data bus means instruction data. shift clock pulse: d1bscp pin shift clock pulses: connect with scp pin of column driver. lcd driver latches data bus value by falling edge of this pin. chip enable for column driver 1: connect with ce pin of column driver 1. latch pulse: d2blp pin latch pulses output: connect with lp/eio1 pin of column/row driver. display data is latched in 1st shift register in lcd driver by rising edge of this pin. and shift to next shift register by lp and scp = ?h?. chip enable for column driver 2: connect with ce pin of column driver 2. frame: d3bfr pin lcd frame output: connect with fr pin of column/row driver. chip enable for column driver 3: connect with ce pin of column driver 3. cascade pulse: dlebcd pin cascade pulses output: connect with dio1 pin of row driver. these pin outputs 1 shot pulse by every d3bfr pin changes. chip enable for row driver: connect with le pin of row driver. external pins display off: doff pin display off output: connect with dspof terminal of column/row driver. ?l? means display off and ?h? means display on.
tmp92c820 2007-02-16 92c820-242 3.14.2 block diagram figure 3.14.1 lcdc block diagram column incrementor row incrementor selecto r cpu address bus: a 0 to a23 mmu external data bus: a0 to a23 lcd bus ld0 to ld7 clea r innerscp generate system clock: f sys cpu busak output column counter (9 bits) comparato r column register r s q scpen d1bscp column end busrq glcdc address bus lower rate clock: fs ta3out shift register increment (14 bits) lp generate row register external d2blp bcd generate fp register external dlebcd row counter fr generate external d3bfr internal i/o data bus internal i/o data bus to internal int (rising edge) lp output circuit cursor control gray scale control external data bus: d0 to d15 fr driver dvm register 1 dvm register 2 fr driver 80 bytes fifo and scp generator 2 , 4 , 8 clock divider f sys
tmp92c820 2007-02-16 92c820-243 3.14.3 sfrs lcdmode register 7 6 5 4 3 2 1 0 bit symbol bae aae scpw1 scpw0 ta3lcdck bulk ramtype mode read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 0 1 0 0 0 0 0 function b-area 0: disable 1: enable a-area 0: disable 1: enable 00: base scp 01: 2 clocks 10: 4 clocks 11: 8 clocks select low- frequency clock 0: 32 khz 1: ta3out byte- number/ common 0: 512 bytes 1: 1024 bytes * (note 4) display ram 0: sram 1: sdram mode selection 0: ram 1: sr note 1: is effective when is set to ?1?. shows how to generate address for next common. note 2: the sdram accessing way of lcdc is only ?burst 1clk access?. note 3: base scpw<1:0> is introduced in section. 3.14.4.6. note 4: refer to 0h table 3.14.1. table 3.14.2 sdram bulk and column address lcdmode 0 1 sdramc sdacr type a type b bulk of 1 page 512 bytes 1024 bytes divide frm register 7 6 5 4 3 2 1 0 bit symbol fmn7 fmn6 fmn5 fmn4 fmn3 fmn2 fmn1 fmn0 read/write r/w after reset 0 0 0 0 0 0 0 0 function setting dvm bit7 to 0 lcd size setting register 7 6 5 4 3 2 1 0 bit symbol com3 com2 com1 com0 seg3 seg2 seg1 seg0 read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function setting the lcd common number for sr mode 0000: 128 0101: 400 0001: 160 0110: 480 0010: 200 0011: 240 0100: 320 other: reserved setting the lcd segment number for sr mode 0000: 128 0101: 480 0001: 160 0110: 560 0010: 240 0111: 640 0011: 320 0100: 400 other: reserved lcdmode (0200h) lcddvm (0201h) lcdsize (0202h)
tmp92c820 2007-02-16 92c820-244 lcd control register 7 6 5 4 3 2 1 0 bit symbol lcdon all0 frmon ? fp9 mmulcd fp8 start read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function doff port 0: off 1: on ld bus output control 0: normal 1: all display data = 0 divided fr mode 0: disable 1: enable always write ?0?. setting bit9 for f fp [9:0] type selection of lcd driver with built-in ram 0: sequential access type 1: random access type setting bit8 for f fp [9:0] start control in sr mode 0: stop 1: start lcdc start/stop bit 0 lcdc stop 1 lcdc start ram internal lcd driver type selection 0 sequential access type 1 random access type flame frequency division mode 0 disable 1 enable ld bus output control 0 normal 1 all ?0? note: this bit is forced setting it to ?0? (light off) by writing ?1? that data transfer to lcdd. usually, writing ?0?. pin of lcd driver: doff 0 driver off 1 driver on note: this bit decide state of doff pin. case of ?0?: output ?0? case of ?1?: output ?1? figure 3.14.2 lcdc control register 1 lcdctl (0203h)
tmp92c820 2007-02-16 92c820-245 lcd f fp register 7 6 5 4 3 2 1 0 bit symbol fp7 fp6 fp5 fp4 fp3 fp2 fp1 fp0 read/write r/w after reset 0 0 0 0 0 0 0 0 function setting bit7 to 0 for f fp lcd gray level setting register 7 6 5 4 3 2 1 0 bit symbol gray1 gray0 read/write r/w after reset 0 0 function 00: monochrome 01: 4 levels 10: 8 levels 11: 16 levels figure 3.14.3 lcdc control register 2 table 3.14.3 lcd start/e nd address register start address register end address register h (bit23 to bit16) m (bit15 to bit8) l (bit7 to bit0) h (bit23 to bit16) m (bit15 to bit8) l (bit7 to bit0) a-area lsarah (0211h) lsaram (0210h) ? learah (0213h) learam (0212h) ? after reset 40h 00h ? 40h 00h ? b-area lsarbh (0215h) lsarbm (0214h) ? learbh (0217h) learbm (0216h) ? after reset 40h 00h ? 40h 00h ? c-area lsarch (021ah) lsarcm (0219h) lsarcl (0218h) ? ? ? after reset 40h 00h 00h ? ? ? note: all registers are available for r (read)/w (write). lcdffp (0204h) lcdgl (0205h)
tmp92c820 2007-02-16 92c820-246 lcd cursor setting register 7 6 5 4 3 2 1 0 bit symbol cde ccs cbe1 cbe0 read/write r/w r/w r/w r/w after reset 0 0 0 0 function cursor 0: off 1: on cursor color 0: white 1: black cursor blink interval ( xt1: 32 khz ) 00: don?t blink 01: 2 hz 10: 1 hz 11: 0.5 hz note 1: cursor brink interval make using low clock (fs). this function doesn?t depend on lcdmode. therefore if you use blink function, you set low clock condition. note 2: also case of using timer out ?ta3out? to lcdck, cursor brink internal depend on fs. lcd cursor width setting register 7 6 5 4 3 2 1 0 bit symbol cw4 cw3 cw2 cw1 cw0 read/write r/w r/w r/w r/w r/w after reset 0 0 0 0 0 function cursor width (x size) 00000: 1 dot (min) 11111: 32 dots (max) lcd cursor height setting register 7 6 5 4 3 2 1 0 bit symbol ch4 ch3 ch2 ch1 ch0 read/write r/w r/w r/w r/w r/w after reset 0 0 0 0 0 function cursor height (y size) 00000: 1 dot (min) 11111: 32 dots (max) figure 3.14.4 lcdc control register 3 lcdcm (0206h) lcdcw (0207h) lcdch (0208h)
tmp92c820 2007-02-16 92c820-247 hot point of lcd cursor x bit setting register 7 6 5 4 3 2 1 0 bit symbol apb3 apb2 apb1 apb0 read/write r/w after reset 0 0 0 0 function setting bit3 to bit0 for cursor hot point (for 1-dot correction) in case of monochrome 0000: position pixel 0 (except burst mode) 1111: position pixel 15 figure 3.14.5 lcdc control register 4 lcd cursor absolute position setting register 7 6 5 4 3 2 1 0 bit symbol cap7 cap6 cap5 cap4 cap3 cap2 cap1 cap0 read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function setting bit7 to bit0 for cursor absolute position lcd cursor absolute position setting register 7 6 5 4 3 2 1 0 bit symbol cap15 cap14 cap13 cap12 cap11 cap10 cap9 cap8 read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function setting bit15 to bit8 for cursor absolute position lcd cursor absolute position setting register 7 6 5 4 3 2 1 0 bit symbol cap23 cap22 cap21 cap20 cap19 cap18 cap17 cap16 read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 1 0 0 0 0 0 0 function setting bit23 to bit16 for cursor absolute position figure 3.14.6 lcdc control register 5 lcdcp (0209h) lcdcpl (020ah) lcdcpm (020bh) lcdcph (020ch)
tmp92c820 2007-02-16 92c820-248 lcdc1l, lcdc1h, lcdc2l, lcdc2h, lcdc3l , lcdc3h, lcdr1l and lcdr1h register 7 6 5 4 3 2 1 0 bit symbol d7 d6 d5 d4 d3 d2 d1 d0 read/write depend on the specification of external lcd driver after reset depend on the specification of external lcd driver function depend on the specificati on of external lcd driver figure 3.14.7 lcdc control register 6 these registers do not exist on tmp92c820. these are image for instruction registers and display registers of external ram buil t-in sequential acce ss type lcd driver. address as 1h figure 3.14.4 is assigned to these registers, and the following chip enable pin becomes active when accesse s corresponding address. and, the area of these address is external area, so rd , wr terminal becomes active by external access. 2h figure 3.14.5 shows the address map in the case of controlling ram built-in random access type lcd driver. the explanation part of mmu circuit also explains this. this setup is performed by lcdctl. table 3.14.4 memory mapping for built-in ram sequential access type register address purpose sequential access type chip enable terminal a0 terminal lcdc1l 1fe0h instruction 0 lcdc1h 1fe1h ram built-in type column driver 1 display data d1bscp 1 lcdc2l 1fe2h instruction 0 lcdc2h 1fe3h ram built-in type column driver 2 display data d2blp 1 lcdc3l 1fe4h instruction 0 lcdc3h 1fe5h ram built-in type column driver 3 display data d3bfr 1 lcdr1l 1fe6h instruction 0 lcdr1h 1fe7h ram built-in type row driver display data dlebcd 1
tmp92c820 2007-02-16 92c820-249 table 3.14.5 memory mapping fo r built-in ram random access type address purpose random access type chip enable terminal 3c0000h to 3cffffh ram built-in type driver 1 d1bscp 3d0000h to 3dffffh ram built-in type driver 2 d2blp 3e0000h to 3effffh ram built-in type driver 3 d3bfr 3f0000h to 3fffffh ram built-in type driver dlebcd note 1: we call built-in ram sequential access ty pe lcd driver that use register to access to display ram without address. (exa mple: t6b65a, t6c84 etc., mar/2000) note 2: we call built-in ram random access type lcd driver that is same method to access to sram. (example: t6c23,t6k01 etc., mar/2000)
tmp92c820 2007-02-16 92c820-250 3.14.4 shift register type lcd driver control mode (sr mode) 3.14.4.1 operation set the mode of operation, start address of source data save memory, grayscale level and lcd size to control registers before setting st art register. after set start register lc dc outputs bus release request to cpu and read data from source memory. after that lcdc tran smits data of volume of lcd size to external lcd driver through ld bus (lcd pe rsonal bus). at this time, control signals (dibscp etc.) connected lcd driver output specified waveform synchronizes with data transmission. after finish data tr ansmission, lcdc cancels the bus release request and cpu will re-start. note: sr mode lcdc, during data reading ( during dma operation), cpu is stopped by internal busreq signal. when using sr mode lcdc, programmer need to care the cpu stop time. for detail, see the 3h table 3.14.4.
tmp92c820 2007-02-16 92c820-251 3.14.4.2 grayscale mode indication monochrome, 4, 8 and 16 grayscale mode can be selected by setting lcdgl. and when sdram mode, you can select the size of sdram by setting (lcdmode). tmp92c820 realize grayscale display by th inning out the frame. grayscale control palette is defined by 16 bit register (lgnl/h) shown in 4h table 3.14.6. palette is selected according to the grayscale level (monochrome, 4, 8, 16 gray) for use. (cf. 5h table 3.14.7). on/off for data of each level (e.g., each density) can modify by 16-bit register (lgnl/h). however each register of palette has a initial value, it is possible to adjust finely which matches to lcd driver you use and the characteristic of lcd panel. table 3.14.6 grayscale control palette default setting level code density data setting register (address/after reset) bit 0 123456789 10 11 12 131415 f 16/16 lgfh/l (023fh to e/ffffh) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? e 14/16 lgeh/l (023dh to c/fdfdh) ? ? ? ? ? ? ? ? ? ? ? ? ? ? d 1316 lgdh/l (023bh to a/fdddh) ? ? ? ? ? ? ? ? ? ? ? ? ? c 12/16 lgch/l (0239h to 8/ddddh) ? ? ? ? ? ? ? ? ? ? ? ? b 11/16 lgbh/l (0237h to 6/ddd5h) ? ? ? ? ? ? ? ? ? ? ? a 10/16 lgah/l (0235h to 4/d5d5h) ? ? ? ? ? ? ? ? ? ? 9 9/16 lg9h/l (0233h to 2/d555h) ? ? ? ? ? ? ? ? ? 8 8/16 lg8h/l (0231h to 0/aaaah) ? ? ? ? ? ? ? ? 7 7/16 lg7h/l (022fh to e/8aaah) ? ? ? ? ? ? ? 6 6/16 lg6h/l (022dh to c/8a8ah) ? ? ? ? ? ? 5 5/16 lg5h/l (022bh to a/888ah) ? ? ? ? ? 4 4/16 lg4h/l (0229h to 8/8888h) ? ? ? ? 3 3/16 lg3h/l (0227h to 6/8880h) ? ? ? 2 2/16 lg2h/l (0225h to 4/8080h) ? ? 1 1/16 lg1h/l (0223h to 2/8000h) ? 0 0/16 lg0h/l (0221h to 0/0000h) ? : display on, : display off table 3.14.7 grayscale control palette ef fective registers for each gray level lg0 l/h lg1 l/h lg2 l/h lg3 l/h lg4 l/h lg5 l/h lg6 l/h lg7 l/h lg8 l/h lg9 l/h lga l/h lgb l/h lgc l/h lgd l/h lge l/h lge l/h 16 gray levels ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 8 gray levels ? ? ? ? ? ? ? ? 4 gray levels ? ? ? ? monochrome ? ? : don?t care, ? : effective d3bfr t
tmp92c820 2007-02-16 92c820-252 3.14.4.3 memory mapping the lcdc can display the lcd panel image which is divided horizontally into 3 parts; upper, middle and lower. each area calls a, b and c area that has some characteristics showing below. start/end address of each area in the physical memory space can be defined in the lcd start/end address registers (see 6h table 3.14.3). (c area can be defined only start address.) a and b areas are programmable visibility and they are set enable or not in lcdmode register. when a and b area are disable, the c area take over all panel space. when the size of a or b area is greater than lcd panel, the area of the panel is all c area because the displaying priority is a > b > c. if the a area set to enable while the panel area is defined as all c area (that is a and b area are disable), c area is shifted to under the lcd panel and a area is inserted from the top of the lcd panel. similarly if the b area set to enable while the panel area is defined as all c area, b area is inserted from the bottom of the c area overlapping. figure 3.14.8 memory mapping from physical memory to lcd panel column address a area b area ya yb yc c area 2x a area b area c area vertical pan logic address 400000h 600000h horizontal pan row address reserved area for horizontal pan of c area * display data cannot input closely when you don?t use the pan function. memory map image lcd panel image ya yc yb x
tmp92c820 2007-02-16 92c820-253 ? display memory mapping and panning function lcdc can change the panel window if only you change each start address of a, b and c area. a and b area can be vertical panned by changing row address. while c area can be vertical and horizontal panned by changing row and column address. an important thing is that display data from one line to the next line, cannot be input continuously even if you don?t use the panning function. one row address of display ram corresponds to 1st line of display panel. now display data of 2nd line cannot be set within the 1st row address of display ram even if the necessary data for the size you want to display do not fill the capacity of 1st row address of display ram. adding the one line to display panel is equal to adding one address to row address of display ram. and another important thing is, this limitation is also for sram as display ram without address multiplex. when you use sdram as display ram, you can select the size for display ram capacity of one line (number of column address: select 512 byte = 64 mbytes 1024 byte = 128 mbytes) bit. but in case of using sram, display ram capacity of on e line is fixed to 512 bytes. figure 3.14.9 memory mapping image for sram as display ram display panel of 1st line memory area reserved area for vertical panning (display 1st line) display panel of 2nd line memory area reserved area for vertical panning (display 2nd line) reserved area for vertical panning (display 3rd line) memory area for display 1st line (when using sram, this area is fixed to 512 bytes.) memory area for display 2nd line (when using sram, this area is fixed to 512 bytes.) memory area for display 3rd line (when using sram, this area is fixed to 512 bytes.) display panel of 3rd line memory area 16-bit bus width start address
tmp92c820 2007-02-16 92c820-254 tmp92c820 can select four di splay scale; monochrome, 4 gray, 8 gray and 16 gray levels. with the intrinsic property of gray levels, a pixel is decoded in each gray level from different memory size. a pixel is equal to a bit in memory for monochrome, while a pixel is equal to 2 bits in memory for 4 gray levels, 3 bits for 8 gray le vels and 4 bits for 16 gray levels. therefore when the 4 gray mode, column address in the memory needs twice data capacity as large as dots that is displayed in the lcd panel actually showing 7h figure 3.14.8 8h . place for display data setting has so me differences for each grayscale or sort of memory. figure 3.14.10 memory codes for each gray level in a read cycle (16 bits) and ?px? in above 9h figure 3.14.10 corresponds to the image of lcd panel as below ( 10h figure 3.14.11). but tmp92c820 outputs data of px0 from pe7 (ld7), and data of px7 from pe0 (ld0). therefore pe0 (ld0) should be connected to the msb of lcd driver (e.g., di7) according to lcd driver you us e. please note that the way tmp92c820 outputs the data differs from lcd controller built-in tlcs-900/l1 series of toshiba (e.g., tmp91c815, tmp91c016, and tmp91c025 etc.). figure 3.14.11 connection between ld bus of tmp92c820 and data bus of lcdd px0 px1 px2 px3 px4 px5 px6 px7 px8 px9 px10 px11 px12 px13 px14 px15 ld7 ld6 ld5 ld4 ld3 ld2 ld1 ld0 di7 di6 di5 di4 di3 di2 di1 di0 segment drive r lcd panel px0 px1 px2 px3 px4 px5 px6 px7 px8 px9 px10 px11 px12 px13 px14 px15 px0 px1 px2 px3 px4 px5 px6 px7 px0 px1 px2 px3 px4 px5 px6 px7 px0 px1 px2 px3 px0 px1 px2 px3 : don?t care monochrome (sram mode) monochrome (sdram mode) 4 gray levels 8 gray levels 16 gray levels d0 d7 d8 d15
tmp92c820 2007-02-16 92c820-255 3.14.4.4 hardware cursor tmp92c820 has a cursor that is blinking in terval, color and size can be specified, and maximum size is 32 32. a programmer can control the cursor attr ibutes easily by filling those cursor registers, for example color (white/black), blinking inte rval time, size and precise pixel location. its space location is specified by left-up hot point. (see 11h figure 3.14.12) the precise location of the hot point is determined by memory address (lcdcph, lcdcpm, lcdcpl) and bit correction number (lcd cp). for example, however 1 pixel for displaying needs 2 bits of setting data under 4 gray mode, you can correct the location of hot point every 1 bit by setting pixel number which you want to move in the register (lcdcp). cursor image is showed under the setting a, b, c area are enable, 4 gray mode, start address = 410004h and correction bit (lcdcp) = 3h in the following figure. figure 3.14.12 cursor hot point position and size note: if panning function is set to enable during hardwar e cursor displaying, the cursor moves with the data in the memory. because tmp92c820 sets the hardware cursor in the memory address. a23 a22 a21 a20 a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0 sdram size = 1 = 0 column address row address cursor start address ?0? ignore a area b area c area a area b area c area row address logic address 400000h 600000h memory map image lcd panel image 410000h correction bit: 3h cursor width cursor height hot point column address cursor start address 410004h
tmp92c820 2007-02-16 92c820-256 lcd cursor setting register 7 6 5 4 3 2 1 0 bit symbol cde ccs cbe1 cbe0 read/write r/w r/w r/w r/w after reset 0 0 0 0 function cursor 0: off 1: on cursor color 0: white 1: black cursor blink interval 00: don?t blink 01: 2 hz 10: 1 hz 11: 0.5 hz note 1: the function of cursor blink is effectiv e only when low-frequency oscillator is input 32 khz. note 2: the function of cursor blink depends on the low-fr equency oscillator even if you use timer out ?ta3out? as lcdck. lcd cursor width setting register 7 6 5 4 3 2 1 0 bit symbol cw4 cw3 cw2 cw1 cw0 read/write r/w r/w r/w r/w r/w after reset 0 0 0 0 0 function cursor width (x size) 00000: 1 dot (min) 11111: 32 dots (max) lcd cursor height setting register 7 6 5 4 3 2 1 0 bit symbol ch4 ch3 ch2 ch1 ch0 read/write r/w r/w r/w r/w r/w after reset 0 0 0 0 0 function cursor height (y size) 00000: 1 dot (min) 11111: 32 dots (max) lcd cursor start address setting register 7 6 5 4 3 2 1 0 bit symbol cap7 cap6 cap5 cap4 cap3 cap2 cap1 cap0 read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function setting bit7 to bit0 for cursor start address lcd cursor start address setting register 7 6 5 4 3 2 1 0 bit symbol cap15 cap14 cap13 cap12 cap11 cap10 cap9 cap8 read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function setting bit15 to bit8 for cursor start address lcd cursor start address setting register 7 6 5 4 3 2 1 0 bit symbol cap23 cap22 cap21 cap20 cap19 cap18 cap17 cap16 read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 1 0 0 0 0 0 0 function setting bit23 to bit16 for cursor start address lcdcm (0206h) lcdcw (0207h) lcdch (0208h) lcdcpl (020ah) lcdcpm (020bh) lcdcph (020ch)
tmp92c820 2007-02-16 92c820-257 lcd cursor hot point pixel number (bit correction) setting register 7 6 5 4 3 2 1 0 bit symbol apb3 apb2 apb1 apb0 read/write r/w after reset 0 0 0 0 function setting bit3 to bit0 of pixel for correction of hot point (for 1-dot correction) in case of monochrome (sram mode) 0000: 0 pixels correct 1111: 0 pixels correct in case of monochrome (sdram mode) x000: 0 pixels correct x100: 4 pixels correct and 4 gray levels x001: 1 pixel correct x101: 5 pixels correct x010: 2 pixels correct x110: 6 pixels correct x011: 3 pixels correct x111: 7 pixels correct in case of 8 and 16 gray levels xx00: 0 pixels correct xx10: 2 pixels correct xx01: 1 pixel correct xx11: 3 pixels correct x: don?t care here, it is possible to correct the cursor per 1 bit from the start address set before. pixel number should be adjusted in response to the gray mode setting showing above. for example, when 4 gray levels and 16-bit bus mode, correction should be less than 7 because the smallest pixel is 8 pixels that can set by st art address setting. similarly correction pixel should be less than 15 at mo nochrome mode, 3 at 8 or 16 gray modes. example: when monochrome mode, correction value is (lcdcp) = 011h, and cursor size = (8 8) figure 3.14.13 the location hot point by setting of pixel lcdcp (0209h) hot point 3 bits move start address (lcdcph/m/l) cursor lcd panel
tmp92c820 2007-02-16 92c820-258 3.14.4.5 frame signal settlement tmp92c820 defines so-called frame period (refresh interval for lcd panel) by the value set in f fp [9:0]. dlebcd pin outputs pulse every frame period. d3bfr pin usually outputs the signal inverts polarity every frame period. and tmp92c820 has a special function that can set the timing of inverting frame polarity irrelevant to above frame frequency for the purpose of preventing the patches of display. lcd control register 7 6 5 4 3 2 1 0 bit symbol lcdon all0 frmon ? fp9 mmulcd fp8 start read/write r/w r/w r/w r/w r/w r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function doff port 0: off 1: on setting all column ports to 0 0: normal 1: all display data = 0 divided fr mode 0: disable 1: enable always write ?0?. setting bit9 for f fp [9:0] type setting of lcd driver with built-in ram 0: sequen -tial access type 1: random access type setting bit8 for f fp [9:0] start control in sr mode 0: stop 1: start lcd f fp register 7 6 5 4 3 2 1 0 bit symbol fp7 fp6 fp5 fp4 fp3 fp2 fp1 fp0 read/write r/w after reset 0 0 0 0 0 0 0 0 function setting bit7 to 0 for f fp divide frm register 7 6 5 4 3 2 1 0 bit symbol fmn7 fmn6 fmn5 fmn4 fmn3 fmn2 fmn1 fmn0 read/write r/w after reset 0 0 0 0 0 0 0 0 function setting dvm bit7 to 0 lcdctl (0203h) lcdffp (0204h) lcddvm (0201h)
tmp92c820 2007-02-16 92c820-259 (1) settlement of frame frequency function basic frame period; dlebcd signal, is made according to the resister f fp [9:0] setting mentioned before. however this f fp [9:0] setting is generally equal to common number, frame period can be corrected by increasing f fp [9:0] with ease. this function cannot correct frame frequency higher than that of 12h table 3.14.8. if it is necessary to set frame frequency higher or detailed, please refer to (3) timer out lcdck. the equation can calculate frame period. frame period = lcdck/(d f fp ) [hz] d: constant for each common ( 13h table 3.14.8) f fp : setting of f fp [9:0] register lcdck: source clock of lcd (low clock is usually selected) please select the value of f fp [9:0] as the frame period you want to set in the 14h table 3.14.8 note: please make the value set to f fp [9:0] into the following range. com (common number) f fp 1024 example 1: in the case where frame pe riod is set to 72.10 hz by 240 coms. f fp = 240 (com) + 63 = 303 = 12fh (by 15h table 3.14.8) therefore, lcdctl = 1_hex and lcdffp = 2fh are setup. (2) frame invert adjustment function this mode can prevent the deterioration of display (e.g., patches of display). * note 1: if n is set in (lcddvm) register while this function is set to enable in register (lcdctl)( ?1?), d3bfr pin outputs the signal inverted polarity every (d2blp n) timing. if this function isn?t necessary, d3bfr pin outputs the signal inverted polarity every frequency of dlebcd pin after setti ng this function disable ((lcdctl) = ?0?). and it is no change wave and timi ng for dlebcd pin by lcddvm setting. note: effects of this function have some di fferences as the lcd driver or lcd panel you use actually.
tmp92c820 2007-02-16 92c820-260 (3) timer out lcdck lcd source clock (lcdck) can select lo w frequency (xt1, xt2: 32.768 [khz]) or timer out (ta3out) outputs from internal tmra23. example 2: here indicates the method that frame period is set 70 [hz] by selecting ta3out for sou rce clock of lcd. (fc = 6 [mhz], 128 com) the next equation calculates frame period. frame period = 1/(t lp f fp ) [hz] t lp : the period of d2blp source clock for lcdc defines as xt [hz] and then this t lp represents t lp = d/xt d: the value is 3 at 128 com therefore if you set the frame period at 70 [hz] under 128 com, xt = 128 3 70 = 26880 [hz] xt should be above value. in order to make xt = 26880 [hz] under fc = 6 [mhz] with t1 of timer3, 1/xt = t3 2 8 2/ fc [s] t3: the value of timer register (ta3reg) in short, xt = fc/(t3 2 8 2) [hz] however t3 = (ta3reg) is 6.98 after calculate, it?s impossible to set the value under a decimal point. so if (ta3reg) is set 06h, xt = 31250 [hz]. and because of d = 3, frame period = 31250/(128 3) = 81.38 [hz] further if f fp is 148 (com + 20) with correction, frame period = 31250/(148 3) = 70.38 [hz] reference: to maintain quality for display, please refer to following value for each grayscale. (you have to use settlement of frame frequency function, frame invert adjustment function and timer out lcdck.) monochrome: frame period = 70 [hz] 4/8/16 gray levels: frame period = 140 [hz]
tmp92c820 2007-02-16 92c820-261 figure 3.14.14 timing diagram for sr mode figure 3.14.15 timing diagram for sr mode (detail) d3bfr waveform (in case of 240 rows + 63 (f fp ) and lcddvm = 0bh) figure 3.14.16 d2blp and d3bfr waveform d3bfr dlebcd d2blp d1bscp d7 to d0 f fp = 78.02 hz (at = 120) 1 2 3 1 2 3 1 2 display time for 1 p icture ( 120 com ) data transmission (240 seg = 30 bytes) of volume of 1com 120 120 d3bfr dlebcd d2blp busrq (internal) d1bscp d7 to d0 n n + 1 n + 28 n + 29 t lp : lp period t stop : stop time t opr : cpu operating time t scp = 2 states t lph = 0.5xt xt = 1/32768 [s] 1 state = 1/f sys [s] lp1 lp2 lp3 lp10 lp11 lp301 lp302 lp303 lp304 d2blp waveform d3bfr waveform divided frame disable divided frame enable
tmp92c820 2007-02-16 92c820-262 table 3.14.8 f fp table for each common number (1/2) d 3 2.5 2 1.5 1.5 1 1 com 128 160 200 240 320 400 480 com + 0 85.33 81.92 81.92 91.02 68.27 81.92 68.27 com + 1 84.67 81.41 81.51 90.64 68.05 81.72 68.12 com + 2 84.02 80.91 81.11 90.27 67.84 81.51 67.98 com + 3 83.38 80.41 80.71 89.90 67.63 81.31 67.84 com + 4 82.75 79.92 80.31 89.53 67.42 81.11 67.70 com + 5 82.13 79.44 79.92 89.16 67.22 80.91 67.56 com + 6 81.51 78.96 79.53 88.80 67.01 80.71 67.42 com + 7 80.91 78.49 79.15 88.44 66.81 80.51 67.29 com + 8 80.31 78.02 78.77 88.09 66.60 80.31 67.15 com + 9 79.73 77.56 78.39 87.73 66.40 80.12 67.01 com + 10 79.15 77.10 78.02 87.38 66.20 79.92 66.87 com + 11 78.58 76.65 77.65 87.03 66.00 79.73 66.74 com + 12 78.02 76.20 77.28 86.69 65.80 79.53 66.60 com + 13 77.47 75.76 76.92 86.35 65.60 79.34 66.47 com + 14 76.92 75.33 76.56 86.01 65.41 79.15 66.33 com + 15 76.38 74.90 76.20 85.67 65.21 78.96 66.20 com + 16 75.85 74.47 75.85 85.33 65.02 78.77 66.06 com + 17 75.33 74.05 75.50 85.00 64.82 78.58 65.93 com + 18 74.81 73.64 75.16 84.67 64.63 78.39 65.80 com + 19 74.30 73.22 74.81 84.34 64.44 78.21 65.67 com + 20 73.80 72.82 74.47 84.02 64.25 78.02 65.54 com + 21 73.31 72.42 74.14 83.70 64.06 77.83 65.41 com + 22 72.82 72.02 73.80 83.38 63.88 77.65 65.27 com + 23 72.34 71.62 73.47 83.06 63.69 77.47 65.15 com + 24 71.86 71.23 73.14 82.75 63.50 77.28 65.02 com + 25 71.39 70.85 72.82 82.44 63.32 77.10 64.89 com + 26 70.93 70.47 72.50 82.13 63.14 76.92 64.76 com + 27 70.47 70.09 72.18 81.82 62.95 76.74 64.63 com + 28 70.02 69.72 71.86 81.51 62.77 76.56 64.50 com + 29 69.57 69.35 71.55 81.21 62.59 76.38 64.38 com + 30 69.13 68.99 71.23 80.91 62.42 76.20 64.25 com + 31 68.70 68.62 70.93 80.61 62.24 76.03 64.13 com + 32 68.27 68.27 70.62 80.31 62.06 75.85 64.00 com + 33 67.84 67.91 70.32 80.02 61.88 75.68 63.88 com + 34 67.42 67.56 70.02 79.73 61.71 75.50 63.75 com + 35 67.01 67.22 69.72 79.44 61.54 75.33 63.63 com + 36 66.60 66.87 69.42 79.15 61.36 75.16 63.50 com + 37 66.20 66.53 69.13 78.86 61.19 74.98 63.38 com + 38 65.80 66.20 68.84 78.58 61.02 74.81 63.26 com + 39 65.41 65.87 68.55 78.30 60.85 74.64 63.14 com + 40 65.02 65.54 68.27 78.02 60.68 74.47 63.02 com + 41 64.63 65.21 67.98 77.74 60.51 74.30 62.89 com + 42 64.25 64.89 67.70 77.47 60.35 74.14 62.77 com + 43 63.88 64.57 67.42 77.19 60.18 73.97 62.65 com + 44 63.50 64.25 67.15 76.92 60.01 73.80 62.53 com + 45 63.14 63.94 66.87 76.65 59.85 73.64 62.42 com + 46 62.77 63.63 66.60 76.38 59.69 73.47 62.30 com + 47 62.42 63.32 66.33 76.12 59.52 73.31 62.18 com + 48 62.06 63.02 66.06 75.85 59.36 73.14 62.06 com + 49 61.71 62.71 65.80 75.59 59.20 72.98 61.94 com + 50 61.36 62.42 65.54 75.33 59.04 72.82 61.83 com + 51 61.02 62.12 65.27 75.07 58.88 72.66 61.71
tmp92c820 2007-02-16 92c820-263 table 3.14.8 f fp table for each common number (2/2) d 3 2.5 2 1.5 1.5 1 1 com 128 160 200 240 320 400 480 com + 52 60.68 61.83 65.02 74.81 58.72 72.50 61.59 com + 53 60.35 61.54 64.76 74.56 58.57 72.34 61.48 com + 54 60.01 61.25 64.50 74.30 58.41 72.18 61.36 com + 55 59.69 60.96 64.25 74.05 58.25 72.02 61.25 com + 56 59.36 60.68 64.00 73.80 58.10 71.86 61.13 com + 57 59.04 60.40 63.75 73.55 57.95 71.70 61.02 com + 58 58.72 60.12 63.50 73.31 57.79 71.55 60.91 com + 59 58.41 59.85 63.26 73.06 57.64 71.39 60.79 com + 60 58.10 59.58 63.02 72.82 57.49 71.23 60.68 com + 61 57.79 59.31 62.77 72.58 57.34 71.08 60.57 com + 62 57.49 59.04 62.53 72.34 57.19 70.93 60.46 com + 63 57.19 58.78 62.30 72.10 57.04 70.77 60.35 com + 64 56.89 58.51 62.06 71.86 56.89 70.62 60.24 com + 65 56.59 58.25 61.83 71.62 56.74 70.47 60.12 com + 66 56.30 58.00 61.59 71.39 56.59 70.32 60.01 com + 67 56.01 57.74 61.36 71.16 56.45 70.17 59.90 com + 68 55.73 57.49 61.13 70.93 56.30 70.02 59.80 com + 69 55.45 57.24 60.91 70.70 56.16 69.87 59.69 com + 70 55.16 56.99 60.68 70.47 56.01 69.72 59.58 com + 71 54.89 56.74 60.46 70.24 55.87 69.57 59.47 com + 72 54.61 56.50 60.24 70.02 55.73 69.42 59.36 com + 73 54.34 56.25 60.01 69.79 55.59 69.28 59.25 com + 74 54.07 56.01 59.80 69.57 55.45 69.13 59.15 com + 75 53.81 55.78 59.58 69.35 55.30 68.99 59.04 com + 76 53.54 55.54 59.36 69.13 55.16 68.84 58.94 com + 77 53.28 55.30 59.15 68.91 55.03 68.70 58.83 com + 78 53.02 55.07 58.94 68.70 54.89 68.55 58.72 com + 79 52.77 54.84 58.72 68.48 54.75 68.41 58.62 com + 80 52.51 54.61 58.51 68.27 54.61 68.27 58.51 note: the above time distance are value which used fs = 32.768 [khz].
tmp92c820 2007-02-16 92c820-264 table 3.14.9 performance listing for each segment and common number (1) sdram (burst) 16 bits, 8/16 gray levels common 128 160 200 240 320 400 480 d 3 2.5 2 1.5 1.5 1 1 segment t lp [ s] 91.6 76.3 61 45.8 45.8 30.5 30.5 t stop [ s] 1.2 1.2 1.2 1.2 1.2 1.2 1.2 128 rate [%] 1.3 1.6 2.0 2.6 2.6 3.9 3.9 t stop [ s] 1.4 1.4 1.4 1.4 1.4 1.4 1.4 160 rate [%] 1.5 1.8 2.3 3.1 3.1 4.6 4.6 t stop [ s] 1.9 1.9 1.9 1.9 1.9 1.9 1.9 240 rate [%] 2.1 2.5 3.1 4.1 4.1 6.2 6.2 t stop [ s] 2.4 2.4 2.4 2.4 2.4 2.4 2.4 320 rate [%] 2.6 3.1 3.9 5.2 5.2 7.9 7.9 t stop [ s] 2.9 2.9 2.9 2.9 2.9 2.9 2.9 400 rate [%] 3.2 3.8 4.8 6.3 6.3 9.5 9.5 t stop [ s] 3.4 3.4 3.4 3.4 3.4 3.4 3.4 480 rate [%] 3.7 4.5 5.6 7.4 7.4 11.1 11.1 t stop [ s] 3.9 3.9 3.9 3.9 3.9 3.9 3.9 560 rate [%] 4.3 5.1 6.4 8.5 8.5 12.8 12.8 t stop [ s] 4.4 4.4 4.4 4.4 4.4 4.4 4.4 640 rate [%] 4.8 5.8 7.2 9.6 9.6 14.4 14.4 (2) sdram (burst) 16 bits, 4 gray levels common 128 160 200 240 320 400 480 d 3 2.5 2 1.5 1.5 1 1 segment t lp [ s] 91.6 76.3 61 45.8 45.8 30.5 30.5 t stop [ s] 1.2 1.2 1.2 1.2 1.2 1.2 1.2 128 rate [%] 1.3 1.6 2.0 2.6 2.6 3.9 3.9 t stop [ s] 1.4 1.4 1.4 1.4 1.4 1.4 1.4 160 rate [%] 1.5 1.8 2.3 3.1 3.1 4.6 4.6 t stop [ s] 1.9 1.9 1.9 1.9 1.9 1.9 1.9 240 rate [%] 2.1 2.5 3.1 4.1 4.1 6.2 6.2 t stop [ s] 2.4 2.4 2.4 2.4 2.4 2.4 2.4 320 rate [%] 2.6 3.1 3.9 5.2 5.2 7.9 7.9 t stop [ s] 2.9 2.9 2.9 2.9 2.9 2.9 2.9 400 rate [%] 3.2 3.8 4.8 6.3 6.3 9.5 9.5 t stop [ s] 3.4 3.4 3.4 3.4 3.4 3.4 3.4 480 rate [%] 3.7 4.5 5.6 7.4 7.4 11.1 11.1 t stop [ s] 3.9 3.9 3.9 3.9 3.9 3.9 3.9 560 rate [%] 4.3 5.1 6.4 8.5 8.5 12.8 12.8 t stop [ s] 4.4 4.4 4.4 4.4 4.4 4.4 4.4 640 rate [%] 4.8 5.8 7.2 9.6 9.6 14.4 14.4
tmp92c820 2007-02-16 92c820-265 (3) sdram (burst) 16 bits, monochrome common 128 160 200 240 320 400 480 d 3 2.5 2 1.5 1.5 1 1 segment t lp [ s] 91.6 76.3 61 45.8 45.8 30.5 30.5 t stop [ s] 0.8 0.8 0.8 0.8 0.8 0.8 0.8 128 rate [%] 0.9 1.0 1.3 1.7 1.7 2.6 2.6 t stop [ s] 0.9 0.9 0.9 0.9 0.9 0.9 0.9 160 rate [%] 1.0 1.2 1.5 2.0 2.0 3.0 3.0 t stop [ s] 1.2 1.2 1.2 1.2 1.2 1.2 1.2 240 rate [%] 1.3 1.5 1.9 2.5 2.5 3.8 3.8 t stop [ s] 1.4 1.4 1.4 1.4 1.4 1.4 1.4 320 rate [%] 1.5 1.8 2.3 3.1 3.1 4.6 4.6 t stop [ s] 1.7 1.7 1.7 1.7 1.7 1.7 1.7 400 rate [%] 1.8 2.2 2.7 3.6 3.6 5.4 5.4 t stop [ s] 1.9 1.9 1.9 1.9 1.9 1.9 1.9 480 rate [%] 2.1 2.5 3.1 4.1 4.1 6.2 6.2 t stop [ s] 2.2 2.2 2.2 2.2 2.2 2.2 2.2 560 rate [%] 2.3 2.8 3.5 4.7 4.7 7.0 7.0 t stop [ s] 2.4 2.4 2.4 2.4 2.4 2.4 2.4 640 rate [%] 2.6 3.1 3.9 5.2 5.2 7.9 7.9 (4) sram (2 states) 16 bits, 8/16 gray levels (note 2) common 128 160 200 240 320 400 480 d 3 2.5 2 1.5 1.5 1 1 segment t lp [ s] 91.6 76.3 61 45.8 45.8 30.5 30.5 t stop [ s] 3.4 3.4 3.4 3.4 3.4 3.4 3.4 128 rate [%] 3.7 4.4 5.5 7.3 7.3 11.0 11.0 t stop [ s] 4.2 4.2 4.2 4.2 4.2 4.2 4.2 160 rate [%] 4.5 5.4 6.8 9.1 9.1 13.6 13.6 t stop [ s] 6.2 6.2 6.2 6.2 6.2 6.2 6.2 240 rate [%] 6.7 8.1 10.1 13.4 13.4 20.2 20.2 t stop [ s] 8.2 8.2 8.2 8.2 8.2 8.2 8.2 320 rate [%] 8.9 10.7 13.4 17.8 17.8 26.7 26.7 t stop [ s] 10.2 10.2 10.2 10.2 10.2 10.2 10.2 400 rate [%] 11.1 13.3 16.6 22.2 22.2 33.3 33.3 t stop [ s] 12.2 12.2 12.2 12.2 12.2 12.2 12.2 480 rate [%] 13.3 15.9 19.9 26.5 26.5 39.8 39.8 t stop [ s] 14.2 14.2 14.2 14.2 14.2 14.2 14.2 560 rate [%] 15.4 18.5 23.2 30.9 30.9 46.4 46.4 t stop [ s] 16.2 16.2 16.2 16.2 16.2 16.2 16.2 640 rate [%] 17.6 21.2 26.5 35.3 35.3 53.0 53.0
tmp92c820 2007-02-16 92c820-266 (5) sram (2 states) 16 bits, 4 gray levels (note 2) common 128 160 200 240 320 400 480 d 3 2.5 2 1.5 1.5 1 1 segment t lp [ s] 91.6 76.3 61 45.8 45.8 30.5 30.5 t stop [ s] 1.8 1.8 1.8 1.8 1.8 1.8 1.8 128 rate [%] 1.9 2.3 2.9 3.8 3.8 5.7 5.7 t stop [ s] 2.2 2.2 2.2 2.2 2.2 2.2 2.2 160 rate [%] 2.3 2.8 3.5 4.7 4.7 7.0 7.0 t stop [ s] 3.2 3.2 3.2 3.2 3.2 3.2 3.2 240 rate [%] 3.4 4.1 5.2 6.9 6.9 10.3 10.3 t stop [ s] 4.2 4.2 4.2 4.2 4.2 4.2 4.2 320 rate [%] 4.5 5.4 6.8 9.1 9.1 13.6 13.6 t stop [ s] 5.2 5.2 5.2 5.2 5.2 5.2 5.2 400 rate [%] 5.6 6.7 8.4 11.2 11.2 16.9 16.9 t stop [ s] 6.2 6.2 6.2 6.2 6.2 6.2 6.2 480 rate [%] 6.7 8.1 10.1 13.4 13.4 20.2 20.2 t stop [ s] 7.2 7.2 7.2 7.2 7.2 7.2 7.2 560 rate [%] 7.8 9.4 11.7 15.6 15.6 23.4 23.4 t stop [ s] 8.2 8.2 8.2 8.2 8.2 8.2 8.2 640 rate [%] 8.9 10.7 13.4 17.8 17.8 26.7 26.7 (6) sram (2 states) 16 bi ts, monochrome (note 2) common 128 160 200 240 320 400 480 d 3 2.5 2 1.5 1.5 1 1 segment t lp [ s] 91.6 76.3 61 45.8 45.8 30.5 30.5 t stop [ s] 1.0 1.0 1.0 1.0 1.0 1.0 1.0 128 rate [%] 1.0 1.2 1.6 2.1 2.1 3.1 3.1 t stop [ s] 1.2 1.2 1.2 1.2 1.2 1.2 1.2 160 rate [%] 1.3 1.5 1.9 2.5 2.5 3.8 3.8 t stop [ s] 1.7 1.7 1.7 1.7 1.7 1.7 1.7 240 rate [%] 1.8 2.2 2.7 3.6 3.6 5.4 5.4 t stop [ s] 2.2 2.2 2.2 2.2 2.2 2.2 2.2 320 rate [%] 2.3 2.8 3.5 4.7 4.7 7.0 7.0 t stop [ s] 2.7 2.7 2.7 2.7 2.7 2.7 2.7 400 rate [%] 2.9 3.5 4.3 5.8 5.8 8.7 8.7 t stop [ s] 3.2 3.2 3.2 3.2 3.2 3.2 3.2 480 rate [%] 3.4 4.1 5.2 6.9 6.9 10.3 10.3 t stop [ s] 3.7 3.7 3.7 3.7 3.7 3.7 3.7 560 rate [%] 4.0 4.8 6.0 8.0 8.0 12.0 12.0 t stop [ s] 4.2 4.2 4.2 4.2 4.2 4.2 4.2 640 rate [%] 4.5 5.4 6.8 9.1 9.1 13.6 13.6 note 1: these tables are calculated at following condition. 1) f sys = 20 [mhz] 2) fs = 32.768 [khz] 3) overhead state number are 8 states for sdram and 3 states for sram. note 2: for sram tables ((4) to (6)), t stop is calculated at 2-state accessing.
tmp92c820 2007-02-16 92c820-267 table 3.14.10 possible panel size of panning 64-mbit sdram/burst horizontal seg 128 160 240 320 400 480 560 640 monochrome 16.0 12.8 8.5 6.2 5.1 4.3 3.7 3.2 panels 4 gray levels 16.0 12.8 8.5 6.4 5.1 4.3 3.7 3.2 panels 8 gray levels 8.0 6.4 4.3 3.2 2.6 2.1 1.8 1.6 panels 16 gray levels 8.0 6.4 4.3 3.2 2.6 2.1 1.8 1.6 panels vertical com 128 160 200 240 320 400 480 32.0 25.6 20.5 17.1 12.8 10.2 8.5 panels 128-mbit sdram/burst horizontal seg 128 160 240 320 400 480 560 640 monochrome 32.0 25.6 17.1 12.8 10.2 8.5 7.3 6.4 panels 4 gray levels 32.0 25.6 17.1 12.8 10.2 8.5 7.3 6.4 panels 8 gray levels 16.0 12.8 8.5 6.4 5.1 4.3 3.7 3.2 panels 16 gray levels 16.0 12.8 8.5 6.4 5.1 4.3 3.7 3.2 panels vertical com 128 160 200 240 320 400 480 32.0 25.6 20.5 17.1 12.8 10.2 8.5 panels sram horizontal seg 128 160 240 320 400 480 560 640 monochrome 32.0 25.6 17.1 12.8 10.2 8.5 7.3 6.4 panels 4 gray levels 16.0 12.8 8.5 6.4 5.1 4.3 3.7 3.2 panels 8 gray levels 8.0 6.4 4.3 3.2 2.6 2.1 1.8 1.6 panels 16 gray levels 8.0 6.4 4.3 3.2 2.6 2.1 1.8 1.6 panels vertical com 128 160 200 240 320 400 480 32.0 25.6 20.5 17.1 12.8 10.2 8.5 panels
tmp92c820 2007-02-16 92c820-268 note 1: the value of the table 3.14.8 is at f fph = 36 [mhz]. note 2: cpu stop time; t stop (in the figure 3.14.17) is the ti me which cpu reads the memory of transferring with 0 waits. note 3: the following equation can calculate t lp listed below. (fs = 32.768 [khz]) t lp = d/32768 [s] example: if the row is 240 and d = 1.5 by the above table t lp = 1.5/32768 = 45.8 [ s] figure 3.14.17 stop time and bus occupation rate of cpu d3bfr pin dlebcd pin d2blp pin d1bscp pin d7 to d0 pin 1 2 3 1 2 3 1 2 120 120 t lp bus occupation time of cpu t stop bus occupation rate of cpu = t stop /t lp
tmp92c820 2007-02-16 92c820-269 3.14.4.6 timing charts of interpreting memory codes tmp92c820 supports different memory accessing. they are sram with waits, sdram burst modes, and the size of sdram is 64 or 128 mbits. the access signals for the lcd panel are shown in 16h figure 3.14.18. tmp92c820 include 80 bytes fifo. therefore, if cpu operate high speed, tmp92c820 can to use low-speed lcd driver. to catch low speed lcd driver s, 4 types of scp rates (f sys , f sys /2, f sys /4, and f sys /8) can be selected. the output data (ld7:0) wi ll be issued from the built-in fifo at the rising edge of d1bscp when the fifo is no empty. the work of the fifo is illustrated in 17h figure 3.14.19, where the buffer size 80 bytes. the fifo latches baseld<7:0> signal at the falling edge of basescp that is shown in 18h figure 3.14.20 and 19h figure 3.14.21 for sram and sdram modes respective ly. the fifo is always reset to the empty state by the rising edge of d2blp. in base scp mode (e.g., for scpw1:0 = 00), d1bcp is equal to basescp, ld<7:0> eq ual to baseld<7:0> and no fifo used. generally, the data input rate of fifo should be greater than the output one. to make fifo work correctly, the following condition have to be satisfied by setting sfr properly. (segnum/8 + 1) tcw + 24 t fph < t lp ? t lph here, segnum is the segment number, and t cw d1bscp clock cycle width. referring 20h figure 3.14.22, we can know this re lation means that the last ld<7:0> data must be generated before the rising edge of d2blp. for example, in case of f fph = 36 mhz, xt = 32 khz, 4 gray levels, 240 commons, 640 segments, and sdram burst mode, the following table can be obtained, which tells user that 8 clock mode is impossible and base, 2, 4 clock modes can be used. table 3.14.11 f fph = 36 [mhz], xt = 32 [khz], 4 grayscale, 240 common, 640 segment, sdram burst mode scpw d1bscp rate (mhz) tcw (ns) (segnum/8 + 1) tcw + 24 t fph (ns) t lp ? t lph (ns) judgment base 9 111.2 9674.4 31250 ok 2 clk 9 111.2 9674.4 31250 ok 4 clk 4.5 222.4 18681.6 31250 ok 8 clk 2.25 444.8 36696 31250 error note: in case of sdram burst mode and 8/16 gray, t he speed of base setting is equal to that of 2 clk. figure 3.14.18 timing diagram for the lcd driver access signals out ? 1 out out + 1 out + 2 out + 3 out + 4 out ? 1 out out + 1 out ? 1 out f sys d1bscp ld7 to ld0 d1bscp ld7 to ld0 d1bscp ld7 to ld0 2-clock scp 4-clock scp 8-clock scp
tmp92c820 2007-02-16 92c820-270 note: d1bcp = basescp and ld<7:0> = baseld<7:0> in basescp mode (e.g., for scpw<1:0> = 00) figure 3.14.19 timing diagram for fifo out + 1 80 bytes fifo basescp out out + 1 out f sys /2, f sys /4, f sys /8 f s y s d2blp baseld7 to baseld0 ld7 to ld0 d1bscp
tmp92c820 2007-02-16 92c820-271 figure 3.14.20 timing diagram for sram mode with basescp figure 3.14.21 timing diagram for sdram burst mode with basescp out + 3 out ? 1 out ? 1 out + 3 out + 4 n in internal system clock (f sys ) monochrome monochrome, 4 gray levels n + 1 n + 2 n + 3 n + 4 n + 5 in + 1 in + 2 in + 3 in + 4 in + 5 out + 1 out + 2 out + 2 out + 1 out out out + 3 out + 4 out + 1 out out out + 4 out + 2 4 gray levels 8/16 gray levels out + 1 out out ? 1 8/16 gray levels ? a 23 to a0 d15 to d0 basescp baseld7 to baseld0 rd basescp baseld7 to baseld0 basescp baseld7 to baseld0 basescp data width: 16 bits data width: 32 bits 2 states sram 0 wait mode out + 1 out + 1 out + 1 out + 2 out + 3 out + 4 out + 5 out + 6 out + 2 in + 2 in + 3 in + 4 in + 5 in + 6 in + 7 in + 1 row 227 f s y s a 23 to a0 d15 to d0 basescp in out out rd baseld7 to baseld0 column out + 3 out + 4 out + 5 out + 6 out + 2 basescp out baseld7 to baseld0 basescp baseld7 to baseld0 basescp monochrome monochrome, 4 gray 4 gray levels 8/16 gray levels 8/16 gray levels ? data width: 16 bits data width: 32 bits sdram burst mode
tmp92c820 2007-02-16 92c820-272 sdram burst1 clock mode note 1: 4t fph t_bufdly tc + 2t fph note 2: t_busdly is about 11 times as long as f sys period (22 t fph ). figure 3.14.22 timing diagram for maximum fifo delay time out + 1 out + 1 out + 2 out + 2 out + 3 out + 1 in + 2 in + 3 in + 4 in + 5 in + 6 in + 7 in + 1 row 227 f s y s a 23 to a0 d15 to d0 basescp ld7 to ld0 d1bscp d2blp in out out out out tcw t _ bufdl y rd baseld7 to baseld0 t _ busdl y ( se g num/8 ) tcw + t _ bufdl y t lph t lp column monochrome
tmp92c820 2007-02-16 92c820-273 3.14.4.7 examples to use note 1: display memory support only 16-bit bus. note 2: other circuit is necessary for lcd drive power supply for lcd driver display. figure 3.14.23 interface example fo r shift register type lcd driver note: because the connection between the line of disp lay ram data and output bus: ld<0:7> is just the mirror invertion, please care of connection. the dat a lsb of display ram is output from ld7. in the above figure, ld0 should be connected to di7 of lcdd driver, and ld1 to di6. for detail information, please refer to 21h figure 3.14.11. vdd o001 vss dir test di7 to di0 dual scp s/c vccl/r, v0l/r, v1l/r, v4l/r, v5l/r o240 eio2 eio1 dspof fr lp v dd v ss dlebcd d1bscp d2blp d3bfr doff ld0 to ld7 control signal d0 to d15 a0 to a23 scp lp fr dspof di7 to di0 eio1 eio2 dir vdd s/c vss test dual vcclr v0lr, v2lr, vsslr, v3lr, v5lr v dd v ss open v ss open a xx to axx d0 to d15 control signal o001 o240 com001 240 commons 240 segments lcd com240 seg001 seg240 t6c13b (240-row driver selection) tmp92c820 display memory (sdram/sram selection) t6c13b (240-column driver selection) power circuit power circuit
tmp92c820 2007-02-16 92c820-274 figure 3.14.24 display reference below sample program 240 commons (dots) 240 segments (dots) 60 dots 60 dots 60 dots 60 dots 20 dots 20 dots cursor blink (black 2 hz)
tmp92c820 2007-02-16 92c820-275 3.14.4.8 sample program ? setting example: in case of use 240 segments 240 commons, 4-level grayscale display, 64-mbit sdram. this sample program operate correctly, lcd panel shows 22h figure 3.14.18 display. ; ***** sdram set ***** ld (sdacr), 2bh ; add-mux enable, 64-mbit select ld (sdrcr), 01h ; interval refresh ; ***** glcdc set ***** ld (lcdmode), 17h ; a/b area off, sdram 64 mbits, sr type ; scp width 2clocks ld (lcddvm), 11 ; 11-count dvm set ld (lcdsize), 32h ; com = 240, seg = 240 ld (lcdctl), 20h ; divi de frame on, display off ld (lcdffp), 240 ; frame frequency correction (91 hz) ld (lcdgl), 01h ; 4-level grayscale ld (lcdcm), 0c1h ; cursor on, black, 2 hz blink ld (lcdcw), 19 ; width = 20 dots ld (lcdch), 19 ; height = 20 dots ld (lcdcp), 00h ; pixel = 0 ld (lcdcpl), 00h ; cursor address ld (lcdcpm), 00h ; cursor address ld (lcdcph), 40h ; cursor address ld (lsarch), 40h ; c_area start address ld (lsarcm), 00h ; c_area start address ld (lsarcl), 00h ; c_area start address ; ***** 0/4 data write 60 row ***** ld xix, 400000h ; ld wa, 0000h ; write data 0/4-level data (0000000000000000b) loop1: ld (xix), wa ; inc 2, xix ; cp xix, 407800h ; 400000h to 4077ffh: 60 rows (dots) jr nz, loop1 ; ; ***** 2/4 data write 60 row ***** ld xix, 407800h ; ld wa, 05555h ; write data 1/4-level data (0101010101010101b) loop2: ld (xix), wa ; inc 2, xix ; cp xix, 40f000h ; 407800h to 40efffh: 60 rows (dots) jr nz, loop2 ; ; ***** 3/4 data write 60 row ***** ld xix, 40f000h ; ld wa, 0aaaah ; write data 2/4-level data (1010101010101010b) loop3: ld (xix), wa ; inc 2, xix ; cp xix, 416800h ; 40f000h to 4167ffh: 60 rows (dots) jr nz, loop3 ;
tmp92c820 2007-02-16 92c820-276 ; ***** 4/4 data write 60 row ***** ld xix, 416800h ; ld wa, 0ffffh ; write data 3/4-level data (1111111111111111b) loop4: ld (xix), wa ; inc 2, xix ; cp xix, 41e000h ; 416800h to 41dfffh: 60 rows (dots) jr nz, loop4 ; ; ***** 4-level gray palette pattern set ***** ld (lg0l), 00h ; 0/4 grayscale palette 0000b ld (lg1l), 05h ; 2/4 grayscale palette 0101b ld (lg2l), 0eh ; 3/4 grayscale palette 1110b ld (lg3l), 0fh ; 4/4 grayscale palette 1111b ; ***** dma, display-on start ***** ld (lcdctl), 0a1h ; display on, divide on
tmp92c820 2007-02-16 92c820-277 3.14.5 ram built-in type lcd driver control mode (ram mode) 3.14.5.1 operation data transmission to lcd driver is ex ecuted by move instruction of cpu. after setting mode of operation to control register, when move instruction of cpu is executed lcdc outputs chip select signal to lcd driver connected to the outside from control pin (d1bscp etc.). therefore control of data transmission numbers corresponding to lcd size is controlled by instruction of cpu. there are 2 kinds of address of lcd driver in this case, and which is chosen determines by lcdctl register. it corresponds to lcd driver which has ev ery 1 byte of instruction register and display data register in lcd driver at the time of = ?0?. please make the transmission place addr ess at this time into either of fe0h to fe7f. (sequential access type: see 23h table 3.14.4.) it corresponds to address direct writing ty pe lcd driver at the time of = ?1.? the transmission place addre ss at this time can also a ssign the memory area of 3c0000h to 3fffff to four area for ev ery 64 kbytes. (random access type) note: this operation mode cannot use cursor function. 24h figure 3.14.25 shows access timing example in = ?0?. also, 25h figure 3.14.26 shows example of connection. note 1: this waveform is the case of 3-state access. note 2: note the different rising timing for d1bscp etc. figure 3.14.25 example of access timing for ram built-in type lcd driver (wait = 0) data-out system clock: f sys a 23 to a0 r/w d1bscp, d2blp, d3bfr, dlebcd d7 to d0 data-in [ write c y cle ] [ read c y cle ]
tmp92c820 2007-02-16 92c820-278 3.14.5.2 examples to use note: other circuit is necessary for lcd drive power supply for lcd driver display. figure 3.14.26 interface example for ram built -in type sequential access type lcd driver vdd com001 vss vlc1, vlc2, vlc3, vlc4, vlc5 com065 le db0 to db5 dspof wr v dd v ss dlebcd d1bscp wr a0 doff d0 to d7 ce wr d/i dspof db0 to db7 eio1 eio2 vdd vss vlc2, vlc3 vlc5 v dd v ss open seg001 seg080 com001 65 com 80 seg lcd com065 seg001 seg080 t6b66a (65-row driver) tmp92c820 t6b65a (80-column driver) power circuit power circuit
tmp92c820 2007-02-16 92c820-279 3.14.5.3 sample program ? setting example: in case of use 80 segment 65 commons lcd driver. assign external column driver to lcdc1 and row driver to lc dr1. this example used ld instruction in setting of instructio n and used burst function of micro dma by soft start in setting of display data. in case of store 650 bytes transfer data to lcd driver. ; setting external terminal ld (pdfc), 19h ; ce for lcdc1: d1bscp, ; le for lcdr1: dlebcd, ; setting for doff ; setting for lcdc ld (lcdmode), 00h ; select ram mode ld (lcdctl), 00h ; sequential access mode ; setting for mode of lcdc1/lcdr1 ld (lcdc1l), xx ; setti ng instruction for lcdc1 ld (lcdr1l), xx ; setti ng instruction for lcdr1 ; setting for micro dma and inttc (ch0) ld a, 08h ; source address inc mode ldc dmam0, a ; ld wa, 650 ; count = 650 ldc dmac0, wa ; ld xwa, 400000h ; source address = 400000h ldc dmas0, xwa ; ld xwa, 1fe1h ; destination address = 1fe1h (lcdc0h) ldc dmad0, xwa ; ld (intetc01), 06h ; inttc0 level = 6 ei 6 ; interrupt level = 6 ld (dmab), 01h ; burst mode ld (dmar), 01h ; soft start
tmp92c820 2007-02-16 92c820-280 3.15 melody/alarm generator (mld) the tmp92c820 contains a melody function an d alarm function, both of which are output from the mldalm pin. five kinds of fixed cycle interrupt are generated using a 15-bit counter for use as the alarm generator. the features are as follows. 1) melody generator the melody function generates signals of any frequency (4 hz to 5461 hz) based on a low-speed clock (32.768 khz), and output s the signals from the mldalm pin. the melody tone can easily be heard by connecting an external loudspeaker. 2) alarm generator the alarm function generates eight kinds of alarm waveform having a modulation frequency (4096 hz) determined by the low-spee d clock (32.768 khz). this waveform can be inverted by setting a value to a register. the alarm tone can easily be heard by connecting an external loudspeaker. five kinds of fixed cycle interrupts are ge nerated (1 hz, 2 hz, 64 hz, 512 hz, and 8192 hz) by using a counter which is used for the alarm generator. this section is constituted as follows. 0h 3.15.1 1h block diagram 2h 3.15.2 3h control registers 4h 3.15.3 5h operational description 6h 3.15.3.1 7h melody generator 8h 3.15.3.2 9h alarm generator
tmp92c820 2007-02-16 92c820-281 3.15.1 block diagram figure 3.15.1 mld block diagram melfh, melfl register comparator (cp0) 12-bit counter (uc0) f/f melody generator edge detector a lmint 15-bit counter (uc1) 8-bit counter (uc2) alarm waveform generator alm register invert melalmc selector a lmout melout melalmc internal data bus reset melfh stop and clea r low-speed clock invert melout a larm generator internal data bus reset intalm0 (8192hz) intalm1 (512 hz) intalm2 (64 hz) intalm3 (2 hz) intalm4 (1 hz) intalmh (halt release) mldalm pin 4096 hz clea r melalmc
tmp92c820 2007-02-16 92c820-282 3.15.2 control registers alm register 7 6 5 4 3 2 1 0 bit symbol al8 al7 al6 al5 al4 al3 al2 al1 alm (1330h) read/write r/w after reset 0 0 0 0 0 0 0 0 function setting alarm pattern melalmc register 7 6 5 4 3 2 1 0 bit symbol fc1 fc0 alminv ? ? ? ? melalm melalmc (1331h) read/write r/w r/w r/w r/w after reset 0 0 0 0 0 0 0 0 function free-run counter control 00: hold 01: restart 10: clear 11: clear and start alarm waveform invert 1: invert always write ?0? output waveform select 0: alarm 1: melody note 1: melalmc is always read ?0?. note 2: when setting melalmc register except wh ile the free-run counter is running, is kept ?01?. melfl register 7 6 5 4 3 2 1 0 bit symbol ml7 ml6 ml5 ml4 ml3 ml2 ml1 ml0 melfl (1332h) read/write r/w after reset 0 0 0 0 0 0 0 0 function setting melody frequency (lower 8 bits) melfh register 7 6 5 4 3 2 1 0 bit symbol melon ml11 ml10 ml9 ml8 melfh (1333h) read/write r/w r/w after reset 0 0 0 0 0 function control melody counter 0: stop and clear 1: start setting melody frequency (upper 4 bits) almint register 7 6 5 4 3 2 1 0 bit symbol ? ialm4e ialm3e ialm2e ialm1e ialm0e almint (1334h) read/write r/w r/w after reset 0 0 0 0 0 0 function always write ?0? 1: interrupt enable for intalm4 to intalm0
tmp92c820 2007-02-16 92c820-283 3.15.3 operational description 3.15.3.1 melody generator the melody function generates signals of any frequency (4 hz to 5461 hz) based on a low-speed clock (32.768 khz) and outputs the signals from the mldalm pin. the melody tone can easily be heard by connecting an external loud speaker. (operation) melalmc must first be set as 1 in order to select the melody waveform to be output from mldalm. the melody output frequency must then be set to 12-bit regi sters melfh and melfl. the following are examples of settings and calculations of melody output frequency. (formula for calculating of melody waveform frequency) at fs = 32.768 [khz] melody output waveform f mld [hz] = 32768/(2 n + 4) setting value for melody n = (16384/ f mld ) ? 2 (note: n = 1 to 4095 (001h to fffh), 0 is not acceptable.) (example program) when outputting an ?a? musical note (440 hz) ld (melalmc), ? ? x x x x x 1 b ; select melody waveform ld (melfl), 23h ; n = 16384/440 ? 2 = 35.2 = 023h ld (melfh), 80h ; start to generate waveform (reference: basic musical scale setting table) scale frequency [hz] register value: n c 264 03ch d 297 035h e 330 030h f 352 02dh g 396 027h a 440 023h b 495 01fh c 528 01dh
tmp92c820 2007-02-16 92c820-284 3.15.3.2 alarm generator the alarm function generates eight kinds of alarm waveform having a modulation frequency of 4096 hz determined by the lo w-speed clock (32.768 khz). this waveform is reversible by setting a value to a register. the alarm tone can easily be heard by connecting an external loud speaker . five kinds of fixed cycle (interrupts can be generated 1 hz, 2 hz, 64 hz, 512 hz, 8 192 hz) by using a counter which is used for the alarm generator. (operation) melalmc must first be set as 0 in order to select the alarm waveform to be output from mldalmc. the ?10? must be set on the melalmc register, and clear internal counter. finally the alarm pattern must then be set on the 8-bit register of alm. if it is inverted output-data, set as invert. the following are examples of program, setting value of alarm pattern and waveform of each setting value. (setting value of alarm pattern) setting value for alm register alarm waveform 00h ?0? fixed 01h al1 pattern 02h al2 pattern 04h al3 pattern 08h al4 pattern 10h al5 pattern 20h al6 pattern 40h al7 pattern 80h al8 pattern other undefined (do not set) (example program) when outputting al2 pattern (31.25 ms/8 times/1 s) ld (melalmc), c0h ; set output alarm waveform ; free-run counter start ld (alm), 02h ; set al2 pattern, start
tmp92c820 2007-02-16 92c820-285 example: waveform of alarm pattern for each setting value: not inverted frequency (4096 hz) 31.25 ms 1 s 1 2 8 1 500 ms 1 62.5 ms 1 s 1 2 1 62.5 ms 1 s 1 2 1 3 62.5 ms 1 62.5 ms 1 2 250 ms a l1 pattern (continuous output) a l2 pattern (31.25 ms/8 times/1 s) a l3 pattern (500 ms/once) a l4 pattern (62.5 ms/twice/1 s) a l5 pattern (62.5 ms/3 times/1 s) a l6 pattern (62.5 ms/once) a l7 pattern (62.5 ms/twice) a l8 pattern (250 ms/once)
tmp92c820 2007-02-16 92c820-286 3.16 sdram controller (sdramc) tmp92c820 includes sdram co ntroller which supports sdram access by cpu/lcdc. the features are as follows. (1) support sdram 16-m/64-m/128-mbit sdram ( 16 bits 2/4 banks) 64-m/128-mbit sdram ( 32 bits 4 banks) (2) automatic initialize function ? all bank pre-charge command generate ? mode register set generate ? 8 times auto refresh (3) access mode cpu access lcdc access burst length 1 word full page addressing mode sequential sequential cas latency (clock) 2 2 write mode single write ? (4) access cycle ? cpu access (read/write) read cycle: 4 states (200 ns at f sys =20 mhz) write cycle: 3 states (150 ns at f sys =20 mhz) access data width: 8 bits/16 bits/32 bits ? lcdc burst access (read only) read cycle: 1 state (50 ns at f sys =20 mhz) over head: 4 states (200 ns at f sys =20 mhz) access data width: 16 bits/32 bits (5) refresh cycle auto generate ? auto refresh is generated while another area is being accessed. ? refresh interval is programmable. ? self refresh is supported notes: ? display data for lcdc must be set from the head of each page. ? program is not operated on sdram. ? condition of sdram?s area is set by cs1 setting of memory controller.
tmp92c820 2007-02-16 92c820-287 3.16.1 control registers 0h figure 3.16.1 shows the sdramc control registers. setting these registers controls the operation of sdramc. sdram access control register 7 6 5 4 3 2 1 0 bit symbol sdini sdbus1 sdbus0 smuxw1 smuxw0 smac read/write r/w r/w r/w r/w after reset 0 0 0 0 0 0 function auto initialize 0: disable 1: enable selecting structure of data bus 00: 16 bits 1 01: 16 bits 2 10: 32 bits 1 selecting address multiplex type 00: type a 01: type b 10: type c 11: reserved sdram controller 0: disable 1: enable sdram refresh control register 7 6 5 4 3 2 1 0 bit symbol sfrc srs2 srs1 srs0 sasfrc src read/write r/w r/w r/w r/w after reset 0 0 0 0 0 0 function self refresh 0: disable 1: enable refresh interval 000: 78 states 100: 195 states 001: 97 states 101: 210 states 010: 124 states 110: 249 states 011: 156 states 111: 312 states auto self refresh 0: disable 1: enable interval refresh 0: disable 1: enable figure 3.16.1 sdramc control registers sdacr (0250h) sdrcr (0251h)
tmp92c820 2007-02-16 92c820-288 3.16.2 operation description (1) memory access control access control block is enabled when sdacr = 1. and then sdram control signals (sdcsl, sdcsh, sdras, sdcas, sdwe, sdlldqm, sdludqm, sduldqm, sduudqm, sdclk and sdcke) are operating during the time cpu or lcdc accesses cs1 area. 1. address multiplex function in the access cycle, address multiplex ou tputs row/column address through a1 to a15 pin. and multiplex width is decided by setting sdacr of use memory size. the relation between multiplex width and memory sizerow/column address is below. table 3.16.1 address multiplex address of sdram accessing cycle row address 92c820 pin name column address type a sdacr = ?00? type b sdacr = ?01? type c sdacr = ?10? a0 a0 a0 a0 a0 a1 a1 a9 a10 a11 a2 a2 a10 a11 a12 a3 a3 a11 a12 a13 a4 a4 a12 a13 a14 a5 a5 a13 a14 a15 a6 a6 a14 a15 a16 a7 a7 a15 a16 a17 a8 a8 a16 a17 a18 a9 a9 a17 a18 a19 a10 a10 a18 a19 a20 a11 a11 a19 a20 a21 a12 a12 a20 a21 a22 a13 a13 a21 a22 a23 a14 a14 a22 a23 a14 a15 a15 a23 a15 a15 2. burst length sdram access by cpu is performed by th e 1-word burst mode. and sdram access by lcdc is performed by the full-page burst mode. sdram access cycle is shown in 1h figure 3.16.2 to 2h figure 3.16.3. sdram accessing cycle number is depending on b1csl register setting. for read cycle, setting of 4 states is necessary (b1csl). for write cycle, setting of 3 states is necessary (b1csl). in the burst read cycle by lcdc, a mode setup and a pre-charge cycle are automatically inserted in a read cycle front and back.
tmp92c820 2007-02-16 92c820-289 figure 3.16.2 timing of cpu read cycle (structure of data bus: 16 bits 1, operand size: 2 bytes, address: 2 n + 0) figure 3.16.3 timing of cpu write cycle (structure of data bus: 16 bits 1, operand size: 2 bytes, address: 2 n + 0) internal precharge sdclk sdcke sdludqm sdlldqm sdcsl sdras sdcas sdwe a11 a1 to a15 d0 to d15 ra ra ca in bank active rd with precharge ca 4 states sdclk sdcke sdludqm sdlldqm sdcsl sdras sdcas sdwe a11 a1 to a15 d0 to d15 ra ra ca bank active wr with precharge internal precharge ca out 3 states
tmp92c820 2007-02-16 92c820-290 figure 3.16.4 timing of cpu write cycle (structure of data bus: 16 bits 1, operand size: 2 bytes, address: 2 n + 1) figure 3.16.5 timing of cpu write cycle (structure of data bus: 16 bits 1, operand size: 1 byte, address: 2 n + 1) sdclk sdcke sdludqm sdlldqm sdcsl sdras sdcas sdwe a11 a15 to a1 ra ra ca d15 to d8 d7 to d0 ra ra ca ca ca out out sdclk sdcke sdludqm sdlldqm sdcsl sdras sdcas sdwe a11 a15 to a1 ra ra ca ca d15 to d8 out d7 to d0
tmp92c820 2007-02-16 92c820-291 figure 3.16.6 timing of cpu read cycle (structure of data bus: 16 bits 2 = 32 bits, operand size: 4 bytes, address: 4 n + 0) figure 3.16.7 timing of cpu write cycle (structure of data bus: 16 bits 2 = 32 bits, operand size: 4 bytes, address: 4 n + 0) sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsh sdcsl sdras sdcas sdwe a12 a2 to a15 d0 to d31 ra ra ca bank active wr with precharge internal precharge 3 states ca out sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsl sdras sdcas sdwe a12 a2 to a15 d0 to d31 ra ra ca in bank active rd with precharge internal precharge ca sdcsh 4 states
tmp92c820 2007-02-16 92c820-292 figure 3.16.8 timing of cpu write cycle (structure of data bus: 16 bits 2 = 32 bits, operand size: 4 bytes, address: 4 n + 1) figure 3.16.9 timing of cpu write cycle (structure of data bus: 16 bits 2 = 32 bits, operand size: 8 bytes, address: 4 n + 3) sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsh sdcsl sdras sdcas sdwe a12 a15 to a2 d31 to d24 ra ra ca out d23 to d16 d15 to d8 d7 to d0 ra ra ca ca ca out out out sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsh sdcsl sdras sdcas sdwe a12 a15 to a2 d31 to d24 ra ra ca ca d23 to d16 out d15 to d8 d7 to d0
tmp92c820 2007-02-16 92c820-293 figure 3.16.10 timing of cpu read cycle (structure of data bus: 32 bits 1, operand size: 4 bytes, address: 4 n + 0) figure 3.16.11 timing of cpu write cycle (structure of data bus: 32 bits 1, operand size: 4 bytes, address: 4 n + 0) sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsl sdras sdcas sdwe a12 a2 to a15 d0 to d31 ra ra ca in bank active rd with precharge internal precharge 4 states ca sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsl sdras sdcas sdwe a12 a2 to a15 d0 to d31 ra ra ca bank active wr with precharge internal precharge 3 states ca out
tmp92c820 2007-02-16 92c820-294 figure 3.16.12 timing of cpu write cycle (structure of data bus: 32 bits 1, operand size: 4 bytes, address: 4 n + 1) figure 3.16.13 timing of cpu write cycle (structure of data bus: 32 bits 1, size: 8 bytes, address: 4 n + 3) sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsl sdras sdcas sdwe a12 a15 to a2 d31 to d24 ra ra ca out d23 to d16 d15 to d8 d7 to d0 ra ra ca ca ca out out out sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsl sdras sdcas sdwe a12 a15 to a2 d31 to d24 ra ra ca ca d23 to d16 out d15 to d8 d7 to d0
tmp92c820 2007-02-16 92c820-295 figure 3.16.14 timing of lcdc burst read cycle sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsl sdcsh sdras sdcas sdwe a11 a1 to a15 d0 to d31 ra bank active full page mode set ra 227 rd ca (n + 4) ca (n ) d (n ) ca (n + 8) ca (n + 12) d (n + 4) d (n + 8) d (n + 12) ?? d (n + 312) d (n + 316) ?? (n + 312) (n + 316) 220 1-word mode set all bank precharge 85 states (320-byte read)
tmp92c820 2007-02-16 92c820-296 (2) refresh control tmp92c820 can generate automatically an auto-refresh cycle for data maintenance of sdram. auto-refresh cycle is generated by setting sdrcr to ?1?. interval of auto refresh can be set by sdrcr fr om the 78 states to the 312 states (3.9 s to 15.6 s at 20 mhz). the generating timing of an auto-refresh cycle becomes into accessing cycles other than sdram area (cs1). the auto-refresh cycle is shown in 3h figure 3.16.15 moreover, the interval of auto refresh is shown in 4h table 3.16.2. figure 3.16.15 timing of auto-refresh cycle table 3.16.2 refresh cy cle insertion interval (unit: s) sdrcr f sys frequency (system clock) srs2 srs1 srs0 insertion interval (state) 5 mhz 10 mhz 12.5 mhz 15 mhz 17.5 mhz 20 mhz 0 0 0 78 15.6 7.8 6.2 5.2 4.5 3.9 0 0 1 97 19.4 9.7 7.8 6.5 5.5 4.9 0 1 0 124 24.8 12.4 9.9 8.3 7.1 6.2 0 1 1 156 31.2 15.6 12.5 10.4 8.9 7.8 1 0 0 195 39.0 19.5 15.6 13.0 11.1 9.8 1 0 1 210 42.0 21.0 16.8 14.0 12.0 10.5 1 1 0 247 49.4 24.7 19.8 16.5 14.1 12.4 1 1 1 312 62.4 31.2 25.0 20.8 17.8 15.6 it does not generate an auto-refresh cy cle during the burst access to sdram by lcdc. the demand of auto-refresh cycle is held in this period. when it returns to cpu access cycle, an auto-refresh cycle is generated. furthermore, tmp92c820 can to generate a self-refresh cycle. the timing of a self-refresh cycle is shown in 5h figure 3.16.16. sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsl sdcsh sdras sdcas sdwe auto refresh 2 states
tmp92c820 2007-02-16 92c820-297 figure 3.16.16 timing of self-refresh cycle note 1: when idle2 mode, continue with output clock. therefore, if want to stop sdclk, switch pf6 to output port before execution halt instruction. note 2: pin condition in idle1/stop mode depends on syscr2 setting. however, when self-refresh mode, pin don?t depend on syscr2, and output low level. if sdrcr is set to ?1?, the self-refresh cycle shown in 6h figure 3.16.16 will occur. the self-refresh mode is used wh en using the standby mode (stop, idle1), which an internal clock stops. in the case of standby mode using self refresh, please set sdrcr to ?1?, before ha lt instruction (stop, idle1). release of a self-refresh cycle is automatically performed by release in the standby mode. it inserts automatically one auto re fresh after self refresh is released, and returns to the auto refresh mode. note: when standby mode is cancelled by a reset, the i/o registers are initialized, therefore, auto refresh is not performed. please do not place the command which accesses sdram, just before setting sdrcr to ?1?. after setting sdrcr to ?1?, at least 4 times of ?nop (s)? are required before halt command execution. example: set 7, (sdrcr) nop nop nop nop halt * at least 4 times nop(s). sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsl sdcsh sdras sdcas sdwe self-refresh entry auto refresh self-refresh exit
tmp92c820 2007-02-16 92c820-298 (3) sdram initialize tmp92c820 can generate the following sdram initialize routine after injection power-supply to sdram. the cycle is shown in 7h figure 3.16.17. 1. precharge of all banks 2. the initial configuration to a mode register 3. the auto-refresh cycle of 8 cycles the above cycle is generated by setting sdacr to ?1?. while performing this cycle, operation (an instruction fetch, command execution) of cpu is stopped. in addition, before performing an initializ ation cycle, a port needs to be set as sdram control signal and an address signal (a1 to a12). after the initialization cycle is finished, sdacr is cleared to ?0? automatically. figure 3.16.17 timing of initialization cycle sduudqm sdclk sdcke sduldqm sdludqm sdlldqm sdcsl sdcsh sdras sdcas sdwe a11 a1 to a15 all bank p rechar g e 220 620 auto refresh 1-word mode set auto refresh auto refresh auto refresh auto refresh 8 times refresh cycle
tmp92c820 2007-02-16 92c820-299 (4) connection example the example of connection with sdram is shown in 8h figure 3.16.18 to 9h figure 3.16.20. table 3.16.3 connection with sdram sdram pin name data bus width 16 bits data bus width 32 bits tmp92c820 pin name 16 mbits 64 mbits 128 mbits 16 mbits 16 bits 2 64 mbits 16 bits 2 64 mbits 32 bits 128 mbits 32 bits a0 ? ? ? ? ? ? ? ? ? a1 a0 (a9) a0 (a9) a0 (a10) ? ? ? ? ? ? a2 a1 (a10) a1 (a10) a1 (a11) a0 (a10) a0 (a10) a0 (a10) a0 (a10) a0 (a10) a0 (a10) a3 a2 (a11) a2 (a11) a2 (a12) a1 (a11) a1 (a11) a1 (a11) a1 (a11) a1 (a11) a1 (a11) a4 a3 (a12) a3 (a12) a3 (a13) a2 (a12) a2 (a12) a2 (a12) a2 (a12) a2 (a12) a2 (a12) a5 a4 (a13) a4 (a13) a4 (a14) a3 (a13) a3 (a13) a3 (a13) a3 (a13) a3 (a13) a3 (a13) a6 a5 (a14) a5 (a14) a5 (a15) a4 (a14) a4 (a14) a4 (a14) a4 (a14) a4 (a14) a4 (a14) a7 a6 (a15) a6 (a15) a6 (a16) a5 (a15) a5 (a15) a5 (a15) a5 (a15) a5 (a15) a5 (a15) a8 a7 (a16) a7 (a16) a7 (a17) a6 (a16) a6 (a16) a6 (a16) a6 (a16) a6 (a16) a6 (a16) a9 a8 (a17) a8 (a17) a8 (a18) a7 (a17) a7 (a17) a7 (a17) a7 (a17) a7 (a17) a7 (a17) a10 a9 (a18) a9 (a18) a9 (a19) a8 (a18) a8 (a18) a8 (a18) a8 (a18) a8 (a18) a8 (a18) a11 a10 (a19) a10 (a19) a10 (a20) a9 (a19) a9 (a19) a9 (a19) a9 (a19) a9 (a19) a9 (a19) a12 bs (a20) a11 (a20) a11 (a21) a10 (a20) a10 (a20) a10 (a20) a10 (a20) a10 (a20) a10 (a20) a13 ? bs0 (a21) bs0 (a22) bs (a21) bs (a21) a11 (a21) a11 (a21) bs0 (a21) a11 (a21) a14 ? bs1 (a22) bs1 (a23) ? ? bs0 (a22) bs0 (a22) bs1 (a22) bs0 (a22) a15 ? ? ? ? ? bs1 (a23) bs1 (a23) ? bs1 (a23) sdcsh ? ? ? cs ? cs ? ? ? sdcsl cs cs cs ? cs ? cs cs cs sduudqm ? ? ? udqm udqm dqm3 dqm3 sduldqm ? ? ? ldqm ldqm dqm2 dqm2 sdludqm udqm udqm udqm udqm udqm dqm1 dqm1 sdlldqm ldqm ldqm ldqm ldqm ldqm dqm0 dqm0 sdras ras ras ras ras ras ras ras ras ras sdcas cas cas cas cas cas cas cas cas cas sdwe we we we we we we we we we sdcke cke cke cke cke cke cke cke cke cke sdclk clk clk clk clk clk clk clk clk clk sdacr 00: 16 bits 1 00: 16 bits 1 00: 16 bits 1 01: 16 bits 2 01: 16 bits 2 10: 32 bits 1 10: 32 bits 1 sdacr 00: type a 00: type a 01: type b 00: ty pe a 00: type a 00: type a 00: type a (an): row address : command address pin of sdram
tmp92c820 2007-02-16 92c820-300 figure 3.16.18 connection with sdram (1 mwords 16 bits) figure 3.16.19 connection with sdram (1 mwords 16 bits 2) tmp92c820 sdram 1 mwords 4 banks 16 bits sdclk sdcke (a22) a14 (a21) a13 a12 to a1 d15 to d0 sdras sdcas sdwe sdcsl sdludqm sdlldqm clk cke bs1 bs0 a11 to a0 d15 to d0 ras cas we cs udqm ldqm tmp92c820 sdram 1 mwords 4 banks 16 bits sdram 1 mwords 4 banks 16 bits sdclk sdcke (a23) a15 (a22) a14 a13 to a2 d31 to d0 sdras sdcas sdwe sdcsh sduudqm sduldqm sdcsl sdludqm sdlldqm clk cke bs1 bs0 a11 to a0 d15 to d0 ras cas we cs udqm ldqm clk cke bs1 bs0 a11 to a0 d15 to d0 ras cas we cs udqm ldqm
tmp92c820 2007-02-16 92c820-301 figure 3.16.20 connection with sdram (512 kwords 32 bits) sdclk sdcke (a22) a14 (a21) a13 a12 to a2 d31 to d0 sdras sdcas sdwe sdcsl sduudqm sduldqm sdludqm sdlldqm clk cke bs1 bs0 a10 to a0 d31 to d0 ras cas we cs dqm3 dqm2 dqm1 dqm0 tmp92c820 sdram 512 kwords 4 banks 32 bits
tmp92c820 2007-02-16 92c820-302 (5) limitation point for sdram there are some points to notice when using sdramc. please refer to the section under below and take care. 1) wait access when using sdram, it is added some limitation of access to all other memories. under the wait pin input setting of memory controller, it is prohibited inserting the time over (14 refresh interval time; in auto refresh function controlled by sdram controller). 2) execution of sdram command before halt instruction (sr(self refresh)-entry , initialize , mode-set) it requires execution time (a few states) to execute the command that sdramc has (sr- entry, initialize). therefore when executing halt instruction after the sdram command, please insert over 10 bytes nop or other 10 byte s instructions before halt instruction. 3) ar (auto refresh) interval time when using sdram, system clock freque ncy must be set suitable speed for sdram?s specification that is minimu m operating clock and minimum refresh interval time. when using sdram under slow mode or down the clock gear, please design the system with special care for auto refresh interval time. and please set auto refresh interval time after adding 10 states to distributed auto refresh interval time, because it might not meet the a.c specification of sdram by stopping auto refresh. (example of calculation) condition: f sys = 20mhz, sdram specification of distributed auto refresh interval time = 4096 times/64 ms 64ms/ 4096 times = 15.625 s/1 time = 312.5state/1 time 312.5 ? 10 = 302.5 state/less than 1 time is needed ? 247 state is needed
tmp92c820 2007-02-16 92c820-303 4) auto exit problem when exiting from self refresh mode of sdram when using self refresh function together with stand-by function of cpu or changing clock, it might not be suit specification of sdram. because automatic releasing self refresh function (auto exit function) operates by cpu releasing halt mode. following figure shows example for avoid this problem by s/w. (outline concept to control) *the target ports to change are sdcke pin and sdcs pin. *the method of self refresh entry includes the condition 4). * sr : self refresh , ar : auto refresh halt mode gea r -down o r change to low clock change to port change clk halt interrupt sr condition ar condition auto exit sr condition sr condition general port setting sdram control pin gea r -up or change to high clock f sys cpu port condition sdram controller internal condition sr entry sr exit change to port change clk sr entry ar condition sdram condition ar condition ar condition ar condition sdram control pin 20mhz 32khz
tmp92c820 2007-02-16 92c820-304 3.17 16-bit timer/event counters (tmrb) the tmp92c820 incorporates one multifunctiona l 16-bit timer/event co unter (tmrb0) which have the following operation modes: ? 16-bit interval timer mode ? 16-bit event counter mode ? 16-bit programmable pulse generation (ppg) mode timer/event counter consists of a 16-bit up co unter, two 16-bit timer registers (one of them with a double-buffer structure), a 16-bit captur e registers, two comparators, a capture input controller, a timer flip-flop and a control circuit. timer/event counter is controlled by an 11-byte control sfr. this chapter consists of the following items: 3.17.1 block diagram 3.17.2 operation 3.17.3 sfrs 3.17.4 operation in each mode (1) 16-bit timer mode (2) 16-bit programmable pulse generation (ppg) output mode table 3.17.1 pins and sfr of tmrb0 channel spec tmrb0 external clock/capture trigger input pins none external pins timer flip-flop output pins tb0out0 (also used as pc6) timer run register tb0run (1180h) timer mode register tb0mod (1182h) timer flip-flop control register tb0ffcr (1183h) tb0rg0l (1188h) tb0rg0h (1189h) tb0rg1l (118ah) timer register tb0rg1h (118bh) tb0cp0l (118ch) tb0cp0h (118dh) tb0cp1l (118eh) sfr (address) capture register tb0cp1h (118fh)
tmp92c820 2007-02-16 92c820-305 3.17.1 block diagram figure 3.17.1 block diagram of tmrb0 inte r nal data bus internal data bus run/ clear match detection 16-bit comparator (cp10) 16-bit up counter (uc10) 16-bit time register tb0rg1h/l match detection count clock tb0mod tb0run slelecto r capture, external int input control tb1mod prescaler clock: t0 external int input int7 (unused), int8 (unused) ta1out t1 t4 t16 tb0run tb0mod (from tmra01) capture register 0 tb0cp0h/l tb0mod caputure register 1 tb0cp1h/l 32 16 8 4 2 t1 t4 t16 tb0run internal data bus internal data bus timer flip-flop control tb0ff0 tb0ff1 tb0out0 tb0out1 (unused) overflow int inttbof0 timer flip-flop output register 0 inttb00 register 1 inttb01 int output 16-bit comparator (cp11) 16-bit timer register tb0rg0h/l register buffer 10 time r flip-flop
tmp92c820 2007-02-16 92c820-306 3.17.2 operation (1) prescaler the 5-bit prescaler generates the source clock for timer 0. the prescaler clock ( t0) is divided clock (divided by 8) from the f fph . this prescaler can be started or stopped using tb0run. counting starts when is set to 1; the prescaler is cleared to 0 and stops operation when is cleared to 0. table 3.17.2 prescaler clock resolution timer counter input clock tmrb prescaler tb0mod clock gear selection syscr1 system clock selection syscr1 ? t1(1/2) t4(1/8) t16(1/32) ? 1 (fs) fs/16 fs/64 fs/256 000 (1/1) fc/16 fc/64 fc/256 001 (1/2) fc/32 fc/128 fc/512 010 (1/4) fc/64 fc/256 fc/1024 011 (1/8) fc/128 fc/512 fc/2048 100 (1/16) 0 (fc) 1/8 fc/256 fc/1024 fc/4096 (2) up counter (uc10) uc10 is a 16-bit binary counter which counts up pulses input from the clock specified by tb0mod. any one of the prescaler internal clocks t1, t4 and t16 or an external clock input via the tb0in0 pin can be selected as the input clock. counting or stopping and clearing of the counter is controlled by tb0run. when clearing is enabled, the up counter uc10 will be cleared to 0 each time its value matches the value in the timer register tb0rg1h/l. if clearing is disabled, the counter operates as a free-running counter. clearing can be enabled or disabled using tb0mod. a timer overflow interrupt (inttbof0) is generated when uc10 overflow occurs.
tmp92c820 2007-02-16 92c820-307 (3) timer registers (tb0rg 0h/l and tb0rg1h/l) these two 16-bit registers are used to set the interval time. when the value in the up counter uc10 matches the value set in th is timer register, the comparator match detect signal will go active. setting data for both upper and lower timer registers is always needed. for example, either using a 2-byte data transfer instruction or using 1-byte date transfer instruction twice for the lower 8 bits and upper 8 bits in order. the tb0rg0h/l timer register has a double-b uffer structure, which is paired with a register buffer. the value set in tb0run determines whether the double-buffer structure is enabled or disabled: it is disabled when = 0, and enabled when = 1. when the double buffer is enabled, data is transferred from the register buffer to the timer register when the values in the up counter (uc10) and the timer register tb0rg1h/l match. after a reset, tb0rg0h/l and tb0rg1h/l are undefined. if the 16-bit timer is to be used after a reset, data should be written to it beforehand. on a reset is initialized to 0, disabling the double buffer. to use the double buffer, write data to the timer register, set to 1, then write data to the register buffer as shown below. tb0rg0h/l and the register buffer both have the same memory addresses (001188h and 001189h) allocated to them. if = 0, the value is written to both the timer register and the register buffer. if = 1, the value is written to the register buffer only. the addresses of the timer registers are as follows: note: the timer registers are write-only registers and thus cannot be read. upper 8 bits (tb0rg0h) lower 8 bits (tb0rg0l) tb0rg0h/l 1189h 1188h upper 8 bits (tb0rg1h) lower 8 bits (tb0rg1l) tb0rg1h/l 118bh 118ah tmrb0
tmp92c820 2007-02-16 92c820-308 (4) capture registers (t b0cp0h/l, tb0cp1h/l) these 16-bit registers are used to latch the values in the up counters. all 16 bits of data in the capture registers should be read both upper and lower. for example, using a 2-byte data load instructio n or two 1-byte data load instructions. the least significant byte is read first, followed by the most significant byte. the addresses of the capture registers are as follows: note: the capture registers are read-onl y registers and thus cannot be written to. (5) capture input control this circuit controls the timing to latch the value of the up counter uc10 into tb0cp0h/l, tb0cp1h/l. the value in the up counter can be loaded into a capture register by software. whenever 0 is written to tb0mod, the current value in the up counter is loaded into capture register tb0cp0h/l. it is necessary to keep the prescaler in run mode (i.e., tb0run must be held at a value of 1). note: as described above, whenever 0 is programmed to tb0mod, the current value in the up counter is loaded in to capture register tb0cp0h/l. however, note that the current value in the up count er is also loaded into capture register tb0cp0h/l when 1 is programmed to tb0mod while this bit is holding 0. (6) comparators (cp10 and cp11) cp10 and cp11 are 16-bit comparators which compare the value in the up counter uc10 with the value set in tb0rg0 or tb0rg1 respectively, in order to detect a match. if a match is detected, the comparator generates an interrupt (inttb00 or inttb01 respectively). (7) timer flip-flops (tb0ff0) these flip-flops are inverted by the match detect signals from the comparators and the latch signals to the capture registers. inversion can be enabled and disabled for each element using tb0ffcr. after a reset the value of tb0ff0 is undefined. if ?00? is written to tb0ffcr< tb0ff0c1:0>, tb0ff0 will be inverted. if ?01? is written to the capture registers, the value of tb0ff0 will be set to ?1?. if ?10? is written to the capture registers, the value of tb0ff0 will be cleared to ?0?. the values of tb0ff0 can be output via the timer output pin tb0out0 (which is shared with pc6). timer output should be specified using the port c function register. write to tbnmod register tbnmod capture operation capture capture capture nop notice ?0? wr ?0? wr ?1? wr ?1? wr upper 8 bits (tb0cp0h) lower 8 bits (tb0cp0l) tb0cp0h/l 118dh 118ch tmrb0 upper 8 bits (tb0cp1h) lower 8 bits (tb0cp1l) tb0cp1h/l 118fh 118eh
tmp92c820 2007-02-16 92c820-309 3.17.3 sfrs tmrb0 run register 7 6 5 4 3 2 1 0 bit symbol tb0rde ? i2tb0 tb0prun tb0run read/write r/w r/w r/w r/w r/w after reset 0 0 0 0 0 tmrb0 prescaler up counter (uc10) function double buffer 0: disable 1: enable always write ?0?. idle2 0: stop 1: operate 0: stop and clear 1: run (count up) count operation 0 stop and clear 1 count note: 1, 4, and 5 of tb0run are read as undefined values. figure 3.17.2 the registers for tmrb tb0run (1180h)
tmp92c820 2007-02-16 92c820-310 tmrb0 mode register 7 6 5 4 3 2 1 0 bit symbol ? ? tb0cp0i tb0cpm1 tb0cpm0 tb0cle tb0clk1 tb0clk0 read/write r/w w * r/w after reset 0 0 1 0 0 0 0 0 function always write ?0?. execute software capture 0: software capture 1: undefined capture timing 00: disable 01: reserved 10: reserved 11: ta1out ta1out control up counter 0: disable clearing 1: enable clearing tmrb0 source clock 00: reserved 01: t1 10: t4 11: t16 tmrb0 source clock 00 reserved 01 t1 10 t4 11 t16 up counter (uc10) clear control 0 disable 1 enable clearing on match with tb0rg1h/l. capture/interrupt timing capture control 00 disable 01 reserved 10 reserved 11 capture to tb0cp0h/l at rising edge of ta1out capture to tb0cp1h/l at falling edge of ta1out software capture 0 the value in the up counter is captured to tb0cp0h/l. 1 undefined (note) note: whenever programming ?0? to tb0mod bit, present value of up counter is received to capture register tb0cp0h/l. but, program ?1? to tb0m od in condition of programmed ?0? to tb0mod bit, present value of up counter is received to capture register tb0cp0h/l. therefore you must to regard. figure 3.17.3 the registers for tmrb tb0mod (1182h) prohibit read- modify- write
tmp92c820 2007-02-16 92c820-311 tmrb0 flip-flop control register 7 6 5 4 3 2 1 0 bit symbol ? ? tb0c1t1 tb0c0t1 tb0e1t1 tb0e0t1 tb0ffc1 tb0ffc0 read/write w r/w w * after reset 1 1 0 0 0 0 1 1 tb0ff0 inversion trigger 0: disable trigger 1: enable trigger function always write ?11?. invert when the uc10 value is loaded into tb0cp1h/l. invert when the uc10 value is loaded into tb0cp0h/l. invert when the uc10 value matches the value in tb0rg1h/l. invert when the uc10 value matches the value in tb0rg0h/l. control tb0ff0 00: invert 01: set 10: clear 11: don?t care * always read as 11. timer flip-flop control (tb0ff0) 00 invert 01 set to 1 10 clear to 0 11 don?t care inverted when the uc10 value matches the value in tb0rg0h/l. 0 disable trigger 1 enable trigger inverted when the uc10 value matches the value in tb0rg1h/l. 0 disable trigger 1 enable trigger inverted when the uc10 value is loaded in to tb0cp0h/l. 0 disable trigger 1 enable trigger inverted when the uc10 value is loaded in to tb0cp1h/l. 0 disable trigger 1 enable trigger figure 3.17.4 the registers for tmrb tb0ffcr (1183h) prohibit read- modify- write
tmp92c820 2007-02-16 92c820-312 tmrb0 register 7 6 5 4 3 2 1 0 bit symbol ? read/write w tb0rg0l (1188h) after reset undefined bit symbol ? read/write w tb0rg0h (1189h) after reset undefined bit symbol ? read/write w tb0rg1l (118ah) after reset undefined bit symbol ? read/write w tb0rg1h (118bh) after reset undefined bit symbol ? read/write w tb0cp0l (118ch) after reset undefined bit symbol ? read/write w tb0cp0h (118dh) after reset undefined bit symbol ? read/write w tb0cp1l (118eh) after reset undefined bit symbol ? read/write w tb0cp1h (118fh) after reset undefined note: all registers are prohibited to ex ecute read-modify-write instruction. figure 3.17.5 the registers for tmrb
tmp92c820 2007-02-16 92c820-313 3.17.4 operation in each mode (1) 16-bit timer mode generating interrupts at fixed intervals in this example, the interrupt inttb01 is se t to be generated at fixed intervals. the interval time is set in th e timer register tb0rg1h/l. 7 6 5 4 3 210 tb0run 0 0 x x ? 0 x 0 stop tmrb0. inttb01 x 1 0 0 x 0 0 0 enable inttb01 and set interrupt level 4. disable inttb00. tb0ffcr 1 1 0 0 0 0 1 1 disable the trigger. tb0mod 0 0 1 0 0 1 ** ( ** = 01, 10, 11) select internal clock for input and disable the capture function. tb0rg1 * * * * * * * * set the interval time (16 bits). * * * * * * * * tb0run 0 0 x x ? 1x1 start tmrb0. x: don?t care, ? : no change (2) 16-bit programmable pulse generation (ppg) output mode square wave pulses can be generated at any frequency and duty ratio. the output pulse may be either low active or high active. the ppg mode is obtained by inversion of the timer flip-flop tb0ff0 that is enabled by the match of the up counter uc10 with timer register tb0rg0h/l or tb0rg1h/l and is output to tb0out0. in this mode th e following conditions must be satisfied. (value set in tb0rg0h/l) < (value set in tb0rg1h/l) figure 3.17.6 programmable pulse ge neration (ppg) output waveforms when the tb0rg0 double buffer is enabled in this mode, the value of register buffer 0 will be shifted into tb0rg0 at match with tb0rg1. this feature facilitates the handling of low-duty waves. figure 3.17.7 operation of register buffer match with tb0rg0 (inttb00 interrupt) match with tb0rg1 (inttb01 interrupt) tb0out0 pin q 1 q 2 q 2 q 3 shift into tb0rg1h/l up counter = q 1 up counter = q 2 match with tb0rg0h/l match with tb0rg1h/l tb0rg0h/l (value to be compared) register buffer 0 write tb0rg0h/l
tmp92c820 2007-02-16 92c820-314 the following block diagram illustrates this mode. figure 3.17.8 block diagram of 16-bit mode the following example shows how to set 16-bit ppg output mode: 7 6 5 4 3 210 tb0run 0 0 x x ? 0 x 0 disable the tb0rg0h/l double buffer and stop tmrb0. tb0rg0h/l * * * * * * * * set the duty ratio (16 bits). * * * * * * * * tb0rg1h/l * * * * * * * * set the frequency (16 bits). * * * * * * * * tb0run 1 0 x x ? 0 x 0 enable the tb0rg0h/l double buffer. (the duty and frequency are changed on an inttb01 interrupt.) tb0ffcr 1 1 0 0 1 1 1 0 set the mode to invert tb0ff0 at the match with tb0rg0h/l/tb0rg1h/l. set tb0ff0 to 0. tb0mod 0 0 1 0 0 1 ** ( ** = 01, 10, 11) select the prescaler output clock as the input clock and disable the capture function. pccr x 1 ? x ? x ? ? pcfc x 1 ? x ? x ? ? set pc6 to function as tb0out0. tb0run 1 0 x x ? 1x1 start tmrb0. x: don?t care, ? : no change selector selector tb0run match 16-bit up counter uc10 16-bit comparator internal data bus tb0rg1h/l tb0rg0h/l-wr t1 t4 t16 tb0out0 (ppg output) tb0run clear register buffer 10 tb0rg0h/l 16-bit comparator f/f (tb0ff0)
tmp92c820 2007-02-16 92c820-315 3.18 psb (power supply backup) the power supply input of tmp92c820 is di vided into three sy stems as follows; ? analog power supply input (avcc to avss) ? digital power supply input (dvcc to dvss) ? digital power supply input for rtc (rtcvcc to dvss) the individual power supply input is isolated from each other. figure 3.18.1 power supply input system figure 3.18.2 outside circuit example for psb xt2 xt1 be dvss1 to dvss4 avss cpu control and other logic adc control rtc control high osc low-osc avcc dvcc1 to dvcc3 rtcvcc tmp92c820 be rtc 32k_osc tmp92c820 sub battery fo r rtc main power source for cpu and other device dvcc rtcvcc dvss
tmp92c820 2007-02-16 92c820-316 the tmp92c820 has the power supply backup mode which is designed to work for only rtc under sub battery supply. tmp92c820 enters the power supply backup mode using the be (backup enable signal pin) and the reset . 0h figure 3.18.3 to 1h figure 3.18.4 show the timing diagram of be and reset . figure 3.18.3 normal mode to psb mode figure 3.18.4 normal mode from psb mode backup enable pin ( be ) rtc can work under be = ?l?. it is prohibited to a ccess to rtc registers when be = ?l?. in addition, low-frequency oscillator (fs) isn?t provided except rtc circuit. under this condition, only internal rtc circuit operates, output function ( alarm , intrtc) is prohibited. caution 1) because it might waste powe r consumption if control signal is ?h? level with no-power supply to dvcc, control signal usually set ?l? level or high impedance. however, when using backup function with no-power supply to dvcc, be pin must be input ?l? level. 2) when be pin is set to ?l?, low- frequency oscillato r operates forcibly and rtc operates too. therefore, don?t set to be = ?l?, when low-frequency oscillator and rtc are not operating. 3) when releasing reset , please confirm be pin to be ?h? level completely before releasing reset . reset power source (dvcc) be rtcvcc is always supplied. 10 s reset power source (dvcc) be rtcvcc is always supplied. over 20 system clocks after oscillato r becomes stable
tmp92c820 2007-02-16 92c820-317 4. electrical characteristics 4.1 absolute maximum ratings parameter symbol rating unit power supply voltage v cc ? 0.5 to 4.0 input voltage v in ? 0.5 to v cc + 0.5 v output current (per pin) i ol 2 output current (per pin) i oh ? 2 output current (total) i ol 80 output current (total) i oh ? 80 ma power dissipation (ta = 85c) p d 600 mw soldering temperature (10 s) tsolder 260 storage temperature tstg ? 65 to + 150 operation temperature topr ? 20 to + 70 c note: the absolute maximum ratings are rated values that must not be exceeded during operation, even for an instant. any one of the ratings must not be exceeded. if any absolute maximum rating is exceeded, the device may break down or its performance may be degraded, causing it to catch fire or explode resulting in injury to the user. thus, when designing products that include this device, ensure that no absolute maximum rating value will ever be exceeded. solderability of lead-free products te s t parameter test condition note (1) use of sn-37pb solder bath solder bath temperature = 230 o c, dipping time = 5 seconds the number of times = one, use of r-type flux solderability (2) use of sn-3.0ag-0.5cu solder bath solder bath temperature = 245 o c, dipping time = 5 seconds the number of times = one, use of r-type flux (use of lead-free) pass: solderability rate until forming 95 %
tmp92c820 2007-02-16 92c820-318 4.2 dc electrical characteristics v cc = 3.3 0.3 v/x1 = 4 to 40 mhz/ta = ? 20 to 70c parameter symbol condition min typ. max unit power supply voltage (dvcc = avcc = rtcvcc) (dvss = avss = 0 v) v cc x1 = 4 to 40 mhz (internal 2 to 20 mhz) xt1 = 30 to 34 khz 3.0 3.6 v input low voltage d0 to d7 p10 to p17 (d8 to d15) p20 to p27 (d16 to d23) p30 to p37 (d24 to d31) v il0 0.6 input low voltage p40 to p47 p50 to p57 p60 to p67 p76 p95 pf0, pf3 pg0 to pg4 pl0 to pl7 v il1 0.3v cc input low voltage p90 to p94, p96 pa0 to pa7 pc0, pc1, pc3, pc5, pc6 pf1, pf2, pf4, pf5 be reset v il2 0.25v cc input low voltage am0 to am1 v il3 0.3 input low voltage x1, xt1 v il4 ? 0.3 0.2v cc v input high voltage d0 to d 7 p10 to p17 (d8 to d15) p20 to p27 (d16 to d23) p30 to p37 (d24 to d31) v ih0 2.0 input high voltage p40 to p47 p50 to p57 p60 to p67 p76 p95 pf0, pf3 pg0 to pg4 pl0 to pl7 v ih1 0.7 v cc input high voltage p90 to p94, p96 pa0 to pa7 pc0, pc1, pc3, pc5, pc6 pf1, pf2, pf4, pf5 be reset v ih2 0.75 v cc input high voltage am0 to am1 v ih3 v cc ? 0.3 input high voltage x1, xt1 v ih4 0.8 v cc v cc + 0.3 v
tmp92c820 2007-02-16 92c820-319 v cc = 3.3 0.3 v/x1 = 4 to 40 mhz/ta = ? 20 to 70c parameter symbol condition min typ. max unit output low voltage v ol i ol = 1.6 ma 0.45 v output high voltage v oh i oh = ? 400 a 2.4 v input leakage current i li 0.0 v in v cc 0.02 5 a output leakage current i lo 0.2 v in v cc ? 0.2 0.05 10 a power down voltage at stop (for internal ram backup) v stop v il2 = 0.2 v cc , v ih2 = 0.8 v cc 1.8 3.6 v pull-up resistor reset r rst programmable pull-up resistor r kh 100 400 k pin capacitance c io fc = 1 mhz 10 pf schmitt width v th p90 to p94, p96, pa0 to pa7, pc0, pc1, pc3, pc5, pc6, pf1, pf2, pf4, pf5, be , reset 0.4 1.0 v operating current ( normal) icc 37.0 60 ma idle2 mode icc idle2 26.0 39 ma idle1 mode icc idle1 dv cc = 3.6 v, x1 = 40 mhz (internal 20 mhz) 2.7 5.0 ma stop icc stop dv cc = 3.6 v 0.4 15 a slow iccs 43.0 100 a slow, idel2 mode iccs idle2 30.0 70 a slow, idle1 mode iccs idle1 dv cc = 3.6 v, xt1 = 32.768 khz (internal 15.8625 khz) 8.0 40 a rtcv cc = 3.6 v, xt1 = 32.768 khz 4.0 7.0 rtc v cc power dissipation iccrtc rtcv cc = 2.0 v, xt1 = 32.768 khz 1.0 2.0 a
tmp92c820 2007-02-16 92c820-320 4.3 ac characteristics 4.3.1 basic bus cycle read cycle v cc = 3.3 0.3 v/x1 = 4 to 40 mhz/ta = ? 20 to 70c no. parameter symbol min max at 20 mhz at 16 mhz unit 1 osc period (x1/x2) t osc 25 250 25 31.25 ns 2 system clock period ( = t) t cyc 50 500 50 62.5 ns 3 sdclk low width t cl 0.5t ? 15 10 16 ns 4 sdclk low width t ch 0.5t ? 15 10 16 ns 5-1 a0 to a23 valid d0 to d31 input at 0 waits t ad 2.0t ? 30 70 95 ns 5-2 a0 to a23 valid d0 to d31 input at 1 wait t ad3 3.0t ? 30 120 157.5 ns 6-1 rd fall d0 to d31 input at 0 waits t rd 1.5t ? 30 45 63.75 ns 6-2 rd fall d0 to d31 input at 1 wait t rd3 2.5t ? 30 95 126.25 ns 7-1 rd low width at 0 waits t rr 1.5t ? 20 55 74 ns 7-2 rd low width at 1 wait t rr3 2.5t ? 20 105 136 ns 8 a0 to a23 valid rd fall t ar 0.5t ? 20 5 11 ns 9 rd rise sdclk rise t rk 0.5t ? 20 5 11 ns 10 a0 to a23 valid d0 to d31 hold t ha 0 0 0 ns 11 rd rise d0 to d31 hold t hr 0 0 0 ns 12 wait setup time t tk 15 15 15 ns 13 wait hold time t kt 5 5 5 ns 14 data byte control access time for sram t sba 1.5t ? 30 45 63.75 ns write cycle v cc = 3.3 0.3 v/x1 = 4 to 40 mhz/ta = ? 20 to 70c no. parameter symbol min max at 20 mhz at 16 mhz unit 15-1 d0 to d31 valid wrxx rise at 0 waits t dw 1.25t ? 35 28 43 ns 15-2 d0 to d31 valid wrxx rise at 1 wait t dw3 2.25t ? 35 78 106 ns 16-1 wrxx low width at 0 waits t ww 1.25t ? 30 33 48 ns 16-2 wrxx low width at 1 wait t ww3 2.25t ? 30 83 111 ns 17 a0 to a23 valid wr fall t aw 0.5t ? 20 5 11 ns 18 wrxx fall sdclk rise t wk 0.5t ? 20 5 11 ns 19 wrxx rise a0 to a23 hold t wa 0.25t ? 5 8 11 ns 20 wrxx rise d0 to d31 hold t wd 0.25t ? 5 8 11 ns 21 rd rise d0 to d31 output t rdo 0.5t ? 5 20 26.25 ns 22 write pulse width for sram t swp 1.25t ? 30 32.5 48.125 ns 23 data byte control to end of write for sram t sbw 1.25t ? 30 32.5 48.125 ns 24 address setup time for sram t sas 0.5t ? 20 5 11.25 ns 25 write recovery time for sram t swr 0.25t ? 5 7.5 10.625 ns 26 data setup time for sram t sds 1.25t ? 35 27.5 43.125 ns 27 data hold time for sram t sdh 0.25t ? 5 7.5 10.625 ns ac condition ? output: high = 0.7 v cc , low = 0.3 v cc , c l = 50 pf ? input: high = 0.9 v cc , low = 0.1 v cc
tmp92c820 2007-02-16 92c820-321 (1) read cycle (0 waits) note: the phase relation between x1 input signal and the other signals is unsettled. the timing chart above is an example. sdclk t ch t tk t ad t h a t hr t rr t sb a wait a 0 to a23 d0 to d31 srxb data-in x1 t osc csx rd srwr t cyc t ar t rk t rd
tmp92c820 2007-02-16 92c820-322 (2) write cycle (0 waits) note: the phase relation between x1 input signal and the other signals is unsettled. the timing chart above is an example. x1 sdclk a 0 to a23 d0 to d31 wait rd data-out t osc t c h t c l t c y c t tk t kt t aw t wk t w a t ww t dw t wd t s wr t s dh t s bw t s d s t swp t s a s csx wrxx srxb srwr t rdo
tmp92c820 2007-02-16 92c820-323 (3) read cycle (1 wait) (4) write cycle (1 wait) a 0 to a23 wait data-in t rd 3 t rr 3 t ad 3 sdclk d0 to d31 rd csx a 0 to a23 wait data-out sdclk d0 to d31 rd csx t ww 3 t dw 3 t rd 0 wrxx
tmp92c820 2007-02-16 92c820-324 4.3.2 page rom read cycle (1) 3-2-2-2 mode v cc = 3.3 0.3 v/x1 = 4 to 40 mhz/ta = ? 20 to 70c no. parameter symbol min max at 20 mhz at 16 mhz unit 1 system clock period ( = t) t cyc 50 500 50 62.5 ns 2 a0 and a1 d0 to d31 input t ad2 2.0t ? 50 50 75 ns 3 a2 to a23 d0 to d31 input t ad3 3.0t ? 50 100 138 ns 4 rd fall d0 to d31 input t rd3 2.5t ? 45 80 111 ns 5 a0 to a23 invalid d0 to d31 hold t ha 0 0 0 ns 6 rd rise d0 to d31 hold t hr 0 0 0 ns ac condition ? output: high = 0.7v cc , low = 0.3v cc , c l = 50 pf ? input: high = 0.9v cc , low = 0.1v cc (2) page rom read cycle (3-2-2-2 mode) t h a data-in data-in data-in data-in t cyc a 0 to a23 sdclk d0 to d31 rd cs2 + 0 + 1 + 2 + 3 t ad3 t ad2 t ad2 t ad2 t hr t rd 3 t h a t h a t rd3
tmp92c820 2007-02-16 92c820-325 4.4 sdram controller ac electrical characteristics v cc = 3.3 0.3 v/x1 = 4 to 40 mhz/ta = ? 20 to 70c variable at 20 mhz at 16 mhz no. parameter symbol min max min max min max unit 1 ref/active to ref/active command period t rc 2t 100 125 ns 2 active to precharge command period t ras 2t 100 125 ns 3 active to read/write command delay time t rcd t 50 62.5 ns 4 precharge to active command period t rp t 50 62.5 ns 5 active to active command period t rrd 3t 150 187.5 ns 6 write recovery time (cl * = 2) t wr t 50 62.5 ns 7 clk cycle time (cl * = 2) t ck t 50 62.5 ns 8 clk high level width t ch 0.5t ? 15 10 16.25 ns 9 clk low level width t cl 0.5t ? 15 10 16.25 ns 10 access time from clk (cl * = 2) t ac t ? 30 20 32.5 ns 11 output data hold time t oh 0 0 0 ns 12 data-in setup time t ds t ? 35 15 27.5 ns 13 data-in hold time t dh t ? 5 45 57.50 ns 14 address setup time t as 0.75t ? 35 2.5 11.88 ns 15 address hold time t ah 3 3 3 ns 16 cke setup time t cks 0.5t ? 15 10 16.25 ns 17 command setup time t cms 0.5t ? 15 10 16.25 ns 18 command hold time t cmh 0.5t ? 15 10 16.25 ns 19 mode register set cycle time t rsc t 50 62.5 ns note 1: cl * is cas latency. note 2: ac measuring conditions ? output level: high = 0.7 v cc , low = 0.3 v cc , c l = 50 pf ? input level: high = 0.9 v cc , low = 0.1 v cc.
tmp92c820 2007-02-16 92c820-326 ? sdram read timing (cpu ac cess or lcdc normal access) t ch data-in a 1 to a10 sdclk d0 to d15 16-bit data bus row column row column row column t cl t rp t rcd t ras t rp t cms t cms t cmh t cmh t rrd t ah t as t as t ah t ac t oh sdxdqm sdcs sdras sdcas sdwe a 11 a 12 to a15 data-in a 1 to a11 d0 to d31 32-bit data bus row column row column row column t ah t as t as t ah t ac t oh a 12 a 13 to a15 t c k
tmp92c820 2007-02-16 92c820-327 ? sdram write timing (cpu access) t ch data-out a 1 to a12 sdclk d0 to d15 16-bit data bus row column row column row column t cl t rp t rcd t wr t rp t cms t cms t cmh t ah t as t as t ah t ds t dh sdxdqm sdcs sdras sdcas sdwe a 11 a 12 to a15 a 1 to a11 d0 to d31 32-bit data bus a 12 a 13 to a15 t c k t rrd t cmh t ras data-out row column row column row column t ah t as t as t ah t ds t dh
tmp92c820 2007-02-16 92c820-328 ? sdram burst read timing (start of burst cycle) data-in a 1 to a11 o r a 1 to a10 sdclk d0 to d31 row column row column t rp t cms t cm t ah t as t ac sdxdqm sdcs sdras sdcas sdwe a 12 o r a11 a 13 to a15 o r a 12 to a15 t c k t rcd t cms t cm t cm t cm 227 row 0 t ac data-in data-in t ac t oh t oh t ah t as t as
tmp92c820 2007-02-16 92c820-329 ? sdram burst read timing (end of burst cycle) data-in a 1 to a11 or a 1 to a10 sdclk d0 to d31 220 column column t cm t as t ac sdxdqm sdcs sdras sdcas sdwe a 12 or a11 a 13 to a15 or a 12 to a15 t c k t cms t cms column t ac data-in t oh t oh t cm t cms t cm t rsc t rc 0 column row data-in t oh column
tmp92c820 2007-02-16 92c820-330 ? sdram initialize timing a 1 to a12 sdclk 220 t cms t as sdxdqm sdcs sdras sdcas sdwe a 20 to a23 ( bs0 and bs1 ) t c k t cm t ch t rsc t rc t cl t cms t cm t cm t cm t ah t as
tmp92c820 2007-02-16 92c820-331 ? sdram refresh timing ? sdram self refresh timing sdclk t cms sdxdqm sdcs sdras sdcas sdwe t c k t rc t rc t cm t cms t cm t c k t cks t cks t rc sdclk sdxdqm sdcs sdras sdcas sdwe sdcke
tmp92c820 2007-02-16 92c820-332 4.5 ad conversion characteristics parameter symbol min typ. max unit analog reference voltage ( + ) v refh v cc ? 0.2 v cc v cc analog reference voltage ( ? ) v refl vss vss vss + 0.2 ad converter power supply voltage a vcc v cc v cc v cc ad converter ground a vss vss vss vss analog input voltage a vin vrefl vrefh v analog current for analog reference voltage = 1 0.8 1.2 ma analog current for analog reference voltage = 0 i ref 0.02 5.0 ua total error (quantize error of 0.5 lsb is included) e t 1.0 4.0 lsb 4.6 event counter (ti0, ti4, ti8, ti9, tia, and tib) variable 20 mhz 16 mhz parameter symbol min max min max min max unit clock cycle t vck 8t + 100 500 600 ns clock low width t vckl 4t + 40 240 290 ns clock high width t vckh 4t + 40 240 290 ns
tmp92c820 2007-02-16 92c820-333 4.7 serial channel timing (1) sclk input mode (i/o interface mode) variable 20 mhz 16 mhz parameter symbol min max min max min max unit sclk cycle t scy 16t 0.8 1.0 s output data sclk rise t oss t scy /2 ? 4t ? 110 90 140 sclk rise output data hold t ohs t scy /2 + 2t + 0 500 625 sclk rise input data hold t hsr 0 0 0 sclk rise input data valid t srd t scy ? 0 800 1000 input data sclk rise t rds 0 0 ns (2) sclk output mode (i/o interface mode) variable 20 mhz 16 mhz parameter symbol min max min max min max unit sclk cycle (programmable) t scy 16t 8192t 0.8 409.6 1.0 512 s output data sclk rise t oss t scy /2 ? 40 360 460 sclk rise output data hold t ohs t scy /2 ? 40 360 460 sclk rise input data hold t hsr 0 0 0 sclk rise input data valid t srd t scy ? 1t ? 180 570 757.5 input data sclk rise t rds 0 0 0 ns sclk output mode/ input rising mode sclk (input falling mode) t sc y input data rxd 0 output data txd 1 2 3 t oss t ohs 0 1 2 3 t srd t rds t hsr valid valid valid valid
tmp92c820 2007-02-16 92c820-334 4.8 interrupt operation variable 20 mhz 16 mhz parameter symbol min max min max min max unit int0 to int3 low width t intal 4t + 40 200 290 int0 to int3 high width t intah 4t + 40 200 290 ns 4.9 lcd controller sr mode v cc = 3.3 0.3 v/x1 = 4 to 40 mhz/ta = ? 20 to 70 c variable 20 mhz (tm = 0) 16 mhz (tm = 0) no. parameter symbol min max min max min max unit 1 data vaild d1bscp fall t dsu 0.5t ? 20 + tm 5 11.25 ns 2 d1bscp fall data hold t dhd 0.5t ? 5 + tm 20 26.25 ns 3 d1sbcp clock high width t cwh 0.5t ? 10 + tm 15 21.25 ns 4 d1bscp clock low width t cwl 0.5t ? 10 + tm 15 21.25 ns 5 d1bscp clock cycle t cw t + 2tm 50 62.5 ns note: tm = (2 scpw ? 1) , e.g., if scpw = 3 (8 clock mode) and 20 mhz, tm = (2 3 ? 1) 50 = 350 ld0 to ld7 out t dhd t dsu ld0 to ld7 d1bscp t cwl t cwh t cw
tmp92c820 2007-02-16 92c820-335 4.10 recommended oscillation circuit the tmp92c820 has been evaluate by below the oscillator vender below. use this information when selecting external parts. note: the total load value of the oscillation is the sum of external l oads (c1 and c2) and the floating load of the actual assembled board. there is a possibility of operating error when using c1 and c2 values in the table below. when designing the board, design the minimum length pattern around the oscillator. we also recommend that oscillator evaluation be carried out using the actual board. (1) connection example figure 4.10.1 high-frequency oscillator f igure 4.10.2 low-fr equency oscillator (2) tmp92c820 recommended ceramic oscillator : murata manufacturing co., ltd; japan note 1: the figure in parentheses ( ) under c1 and c2 is the built-in condenser type. note 2: the product numbers and specificati ons of the osillators made by murata manuf acturing co., ltd. are subject to change. for up-to-date information, please refer to the following url: http://www.murata.co.jp/ parameter of elements running condition mcu oscillation frequency [mhz] type oscillator product number c1 [pf] note1 c2 [pf] note1 rf [ ] rd [ ] voltage [v] tc [ c] 2.000 smd cstcc2m00g56-r0 (47) (47) open 0 1.8~2.7 smd cstcr4m00g55-r0 (39) (39) open 0 4.000 lead cstls4m00g56-b0 (47) (47) open 0 smd cstcr6m00g55-r0 (39) (39) open 0 6.000 lead cstls6m00g56-b0 (47) (47) open 0 smd cstce10m0g52-r0 (10) (10) open 0 cstls10m0g53-b0 (15) (15) open 0 2.7~3.6 10.000 lead cstls10m0g53-b0 (15) (15) open 0 12.000 smd cstce12m5g52-r0 (10) (10) open 0 1.8~2.7
TMP92C820FG 20.000 smd cstcg20m0v53-r0 (15) (15) open 0 2.7~3.6 ? 20~ + 80 x1 x2 c 2 c 1 rd xt1 xt2 c 2 c 1 rd
tmp92c820 2007-02-16 92c820-336 5. table of special function registers (sfrs) the sfrs (special function registers) include the i/o ports and peripheral control registers allocated to the 8-kbyte address space from 000000h to 001fffh. (1) i/o port (2) i/o port control (3) interrupt control (4) dma controller (5) memory controller (6) mmu (7) clock gear (8) lcd controller (9) sdram controller (10) 8-bit timer (11) 16-bit timer (12) uart/serial channel (13) i 2 c bus/serial channel (14) ad converter (15) watchdog timer (16) rtc (real time clock) (17) melody/alarm generator table layout note: ?prohibit rmw? in the table means that y ou cannot use rmw instructions on these registers. example) when setting bit0 only of the register p0cr, the instruction ?set 0, (pxcr)? cannot be used. the ld (transfer) instruction must be used to write all eight bits. read/write r/w: both read and write are possible. r: only read is possible. w: only write is possible. w * : both read and write are possible (when this bit is read as 1). prohibit rmw: read-modify-write instru ctions are prohibited. (ex, add, adc, bus, sbc, inc, dec,and, or, xor, stcf, res, set, chg, tset, rlc, rrc, rl, rr, sla, sra, sll, srl, rld, rrd instructions are read-modify-write instructions.) prohibit rmw * : read-modify-write is prohibited when controlling the pull-up resistor. symbol address name 7 6 1 0 bit symbol read/write initial value after reset remarks
tmp92c820 2007-02-16 92c820-337 table 5.1 i/o register address map [1] port address name address name address name address name 0000h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh p1 p1cr p1fc p2 p2cr p2fc p3 p3cr p3fc 0010h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh p4 p4cr p4fc p5 p5cr p5fc p6 p6cr p6fc p7 p7cr p7fc 0020h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh p8 p8fc2 p8fc p9 p9ode p9cr p9fc pa pafc 0030h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh pc pccr pcfc pf pfcr pffc address name address name 0040h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh pg pj pjfc2 pjfc 0050h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh pk pkfc pl plcr plfc note: do not access un-named addresses.
tmp92c820 2007-02-16 92c820-338 [2] intc [3] dmac address name address name address name address name 00d0h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh inte12 inte3 inteta01 inteta23 intetb01 intetbo0 intes0 intes1 00e0h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh reserved reserved reserved intesb0 reserved intalm01 intalm23 intalm4 intertc intekey intlcd reserved reserved intes2 intep0 00f0h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh inte0ad intetc01 intetc23 intetc45 intetc67 simc iimc intwdt intclr 0100h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh dma0v dma1v dma2v dma3v dma4v dma5v dma6v dma7v dmab dmar reserved [4] memc [5] mmu address name address name address name address name 0140h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh b0csl b0csh mamr0 msar0 b1csl b1csh mamr1 msar1 b2csl b2csh mamr2 msar2 b3csl b3csh mamr3 msar3 0150h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh bexcsl bexcsh 0160h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh pmemcr 01d0h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh local0 local1 local2 local3 note: do not access un-named addresses.
tmp92c820 2007-02-16 92c820-339 [6] cgear [7] lcdc-1 address name address name address name 10e0h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh syscr0 syscr1 syscr2 emccr0 emccr1 emccr2 reserved reserved reserved 0200h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh lcdmode lcddvm lcdsize lcdctl lcdffp lcdgl lcdcm lcdcw lcdch lcdcp lcdcpl lcdcpm lcdcph reserved 0210h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh lsaram lsarah learam learah lsarbm lsarbh learbm learbh lsarcl lsarcm lsarch [7] lcdc-2 address name address name address name 0220h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh lg0l lg0h lg1l lg1h lg2l lg2h lg3l lg3h lg4l lg4h lg5l lg5h lg6l lg6h lg7l lg7h 0230h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh lg8l lg8h lg9l lg9h lgal lgah lgbl lgbh lgcl lgch lgdl lgdh lgel lgeh lgfl lgfh 0240h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh reserved reserved reserved reserved reserved reserved reserved reserved note: do not access un-named addresses.
tmp92c820 2007-02-16 92c820-340 [8] sdramc [9] 8-bit timer [10] 16-bit timer address name address name address name 0250h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh sdacr sdrcr 1100h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh ta01run ta0reg ta1reg ta01mod ta01ffcr ta23run ta2reg ta3reg ta23mod ta3ffcr 1180h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh tb0run tb0mod tb0ffcr tb0rg0l tb0rg0h tb0rg1l tb0rg1h tb0cp0l tb0cp0h tb0cp1l tb0cp1h [11] sio [12] sbi address name address name address name 1200h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh sc0buf sc0cr sc0mod0 br0cr br0add sc0mod1 sircr sc1buf sc1cr sc1mod0 br1cr br1add sc1mod1 1210h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh sc2buf sc2cr sc2mod0 br2cr br2add sc2mod1 1240h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh sbi0cr1 sbi0dbr i2c0ar sbi0cr2/sbi0sr sbi0br0 sbi0br1 note: do not access un-named addresses.
tmp92c820 2007-02-16 92c820-341 [13] 10-bit adc [14] wdt address name address name address name 12a0h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh adreg0l adreg0h adreg1l adreg1h adreg2l adreg2h adreg3l adreg3h adreg4l adreg4h reserved reserved reserved reserved reserved reserved 12b0h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh admod0 admod1 admod2 reserved 1300h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh wdmod wdcr [15] rtc [16] mld address name address name 1320h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh secr minr hourr dayr dater monthr yearr pager restr 1330h 1h 2h 3h 4h 5h 6h 7h 8h 9h ah bh ch dh eh fh alm melalmc melfl melfh almint note: do not access un-named addresses.
tmp92c820 2007-02-16 92c820-342 (1) i/o port symbol name address 7 6 5 4 3 2 1 0 p17 p16 p15 p14 p13 p12 p11 p10 r/w p1 port 1 0004h data from external port (output latch register is cleared to 0) p27 p26 p25 p24 p23 p22 p21 p20 r/w p2 port 2 0008h data from external port (output latch register is cleared to 0) p37 p36 p35 p34 p33 p32 p31 p30 r/w p3 port 3 000ch data from external port (output latch register is cleared to 0) p47 p46 p45 p44 p43 p42 p41 p40 r/w p4 port 4 0010h data from external port (output latch register is cleared to 0) p57 p56 p55 p54 p53 p52 p51 p50 r/w p5 port 5 0014h data from external port (output latch register is cleared to 0) p67 p66 p65 p64 p63 p62 p61 p60 r/w data from external port (output latch register is cleared to 0) p6 port 6 0018h ? p76 p75 p74 p73 p72 p71 p70 r/w p7 port 7 001ch data from external port note1 1 1 1 1 1 1 p87 p86 p85 p84 p83 p82 p81 p80 r/w p8 port 8 0020h 1 1 1 1 1 0 1 1 p96 p95 p94 p93 p92 p91 p90 r/w p9 port 9 0024h data from external port (output latch register is set to 1) pa7 pa6 pa5 pa4 pa3 pa2 pa1 pa0 r pa port a 0028h data from external port pc6 pc5 pc3 pc1 pc0 r/w r/w r/w pc port c 0030h data from external port note2 data from external port note2 data from external port note2 pf5 pf4 pf3 pf2 pf1 pf0 r/w pf port f 003ch data from external port (output latch register is set to 1) pg4 pg3 pg2 pg1 pg0 r pg port g 0040h data from external port pj7 pj6 pj5 pj4 pj3 pj2 pj1 pj0 r/w pj port j 004ch 1 1 1 1 1 1 1 1 pk6 pk4 pk3 pk2 pk1 pk0 r/w r/w pk port k 0050h 1 1 1 1 1 1 pl7 pl6 pl5 pl4 pl3 pl2 pl1 pl0 r/w pl port l 0054h data from external port (output latch register is set to 1) note 1: output latch register is cleared to 0. note 2: output latch register is set to 1
tmp92c820 2007-02-16 92c820-343 (2) i/o port control (1/3) symbol name address 7 6 5 4 3 2 1 0 p17c p16c p15c p14c p13c p12c p11c p10c w 0 0 0 0 0 0 0 0 p1cr port 1 control register 0006h (prohibit rmw) 0: input 1: output p1f w 1 p1fc port 1 function register 0007h (prohibit rmw) 0: port 1:data bus (d8 to d15) p27c p26c p25c p24c p23c p22c p21c p20c w 0 0 0 0 0 0 0 0 p2cr port 2 control register 000ah (prohibit rmw) 0: input 1: output p2f w 0/1 p2fc port 2 function register 000bh (prohibit rmw) 0: port 1: data bus (d16 to d23) p37c p36c p35c p34c p33c p32c p31c p30c w 0 0 0 0 0 0 0 0 p3cr port 3 control register 000eh (prohibit rmw) 0: input 1: output p3f w 0/1 p3fc port 3 function register 000fh (prohibit rmw) 0: port 1: data bus (d24 to d31) p47c p46c p45c p44c p43c p42c p41c p40c w 0 0 0 0 0 0 0 0 p4cr port 4 control register 0012h (prohibit rmw) 0: input 1: output p47f p46f p45f p44f p43f p42f p41f p40f w 1 1 1 1 1 1 1 1 p4fc port 4 function register 0013h (prohibit rmw) 0: port 1: address bus (a0 to a7) p57c p56c p55c p54c p53c p52c p51c p50c w 0 0 0 0 0 0 0 0 p5cr port 5 control register 0016h (prohibit rmw) 0: input 1: output p57f p56f p55f p54f p53f p52f p51f p50f w 1 1 1 1 1 1 1 1 p5fc port 5 function register 0017h (prohibit rmw) 0: port 1: address bus (a8 to a15) p67c p66c p65c p64c p63c p62c p61c p60c w 0 0 0 0 0 0 0 0 p6cr port 6 control register 001ah (prohibit rmw) 0: input 1: output p67f p66f p65f p64f p63f p62f p61f p60f w 1 1 1 1 1 1 1 1 p6fc port 6 function register 001bh (prohibit rmw) 0: port 1: address bus (a16 to a23)
tmp92c820 2007-02-16 92c820-344 i/o port control (2/3) symbol name address 7 6 5 4 3 2 1 0 p76c w 0 p7cr port 7 control register 001eh (prohibit rmw) 0: input 1: output p76f p75f p74f p73f p72f p71f p70f w 0 0 0 0 0 0 1 p7fc port 7 function register 001fh (prohibit rmw) 0: port 1: wait 0: port 1: r/w 0: port 1: wruu 0: port 1: wrul 0: port 1: wrlu 0: port 1: wrll 0: port 1: rd p87f ? p85f p84f p83f p82f p81f p80f w 1 0 0 0 0 0 0 0 p8fc port 8 function register 0023h (prohibit rmw) 0: port 1: sdclk always write 0. 0: port 1: ea25 0: port 1: ea24 0: port 1: cs3 0: port 1: cs2 0: port 1: cs1 0: port 1: cs0 ? p86f2 p85f2 p84f2 ? p82f2 p81f2 p80f2 w 0 0 0 0 0 0 0 0 p8fc2 port 8 function register 2 0021h (prohibit rmw) always write ?0? 0: 1: cs2d 0: 1: cs2c 0: 1: cs2b always write ?0?. 0: 1: cs2a 0: 1: sdcsl 0: 1: sdcsh p96c p95c p94c p93c p92c p91c p90c w 0 0 0 0 0 0 0 p9cr port 9 control register 0026h (prohibit rmw) 0: input 1: output p96f p95f p94f p93f p92f p91f p90f w 0 0 0 0 0 0 0 p9fc port 9 function register 0027h (prohibit rmw) 0: port 1: rxd2, csexa 0: port 1: txd2, cs2g 0: port 1: cs2f 0: port 1: cs2e 0: port, si 1: scl not e 0: port 1: so, sda 0: port, sck input 1: sck output not e p95ode ? ? p92ode p91ode w 0 0 0 0 0 p9ode port 9 ode register 0025h (prohibit rmw) 0: 3 states 1: open drain always write ?0? always write ?0? 0: 3 states 1: open drain 0: 3 states 1: open drain pa7f pa6f pa5f pa4f pa3f pa2f pa1f pa0f w 0 0 0 0 0 0 0 0 pafc port a function register 002bh (prohibit rmw) 0: key-in disable 1: key-in enable pc6c pc5c pc3c pc1c pc0c w w w 0 0 0 0 0 pccr port c control register 0032h (prohibit rmw) 0: input 1: output 0: input 1: output 0: input 1: output pc6f pc5f pc3f pc1f pc0f w w w 0 0 1 0 0 pcfc port c function register 0033h (prohibit rmw) 0: port 1: int3 tb0out0 0: port 1: int2 ta3out 0: port 1: int0 0: port 1: int1 ta1out 0: port 1: ta0in note : when using si and sck input function, set p9fc to ?0? (function setting).
tmp92c820 2007-02-16 92c820-345 i/o port control (3/3) symbol name address 7 6 5 4 3 2 1 0 pf5c pf4c pf3c pf2c pf1c pf0c w 0 0 0 0 0 0 pfcr port f control register 003eh (prohibit rmw) 0: input 1: output pf5f pf3f pf2f pf0f w w w 0 0 0 0 pffc port f function register 003fh (prohibit rmw) 0: port 1: sclk1 output 0: port 1: txd1 0: port 1: sclk0 output 0: port 1: txd0 pj7f pj6f pj5f pj4f pj3f pj2f pj1f pj0f w 0 0 0 0 0 0 0 0 pjfc port j function register 004fh (prohibit rmw) 0: port 1: sdcke 0: port 1: sduudqm 0: port 1: sduldqm 0: port 1: sdludqm 0: port 1: sdlldqm 0: port 1: sdwe 0: port 1: sdcas 0: port 1: sdras ? pf6f2 pf5f2 pf4f2 pf3f2 pf2f2 ? ? w 0 0 0 0 0 0 0 0 pjfc2 port j function register 2 004dh (prohibit rmw) always write ?0?. 0: 1: sruub 0: 1: srulb 0: 1: srlub 0: 1: srllb 0: 1: srwr always write ?0?. always write ?0?. pk6f pk4f pk3f pk2f pk1f pk0f w w 0 0 0 0 0 0 pkfc port k function register 0053h (prohibit rmw) 0: port 1: alarm at = 1 1: mldalm at = 0 0: port 1: doffb 0: port 1: dlebcd 0: port 1: d3bfr 0: port 1: d2blp 0: port 1: d1bscp pl7c pl6c pl5c pl4c pl3c pl2c pl1c pl0c w 0 0 0 0 0 0 0 0 plcr port l control register 0056h (prohibit rmw) 0: input 1: output pl7f pl6f pl5f pl4f pl3f pl2f pl1f pl0f w 0 0 0 0 0 0 0 0 plfc port l function register 0057h (prohibit rmw) 0: port 1: data bus for lcdc (ld7 to ld0)
tmp92c820 2007-02-16 92c820-346 (3) interrupt control (1/3) symbol name address 7 6 5 4 3 2 1 0 int2 int1 i2c i2m2 i2m1 i2m0 i1c i1m2 i1m1 i1m0 r r/w r r/w 0 0 0 0 0 0 0 0 inte12 int1& int2 enable 00d0h 1: int2 level of request interrupt 1: int1 level of request interrupt ? int3 ? ? ? ? i3c i3m2 i3m1 i3m0 ? ? r r/w ? ? ? ? 0 0 0 0 inte3 int3 enable 00d1h always write ?0?. 1: int3 level of request interrupt intta1 (tmra1) intta0 (tmra0) ita1c ita1m2 ita1m1 ita1m0 it a0c ita0m2 ita0m1 ita0m0 r r/w r r/w 0 0 0 0 0 0 0 0 inteta01 intta0& intta1 enable 00d4h 1: intta1 level of request interrupt 1: intta0 level of request interrupt intta3 (tmra3) intta2 (tmra2) ita3c ita3m2 ita3m1 ita3m0 it a2c ita2m2 ita2m1 ita2m0 r r/w r r/w 0 0 0 0 0 0 0 0 inteta23 intta2& intta3 enable 00d5h 1: intta3 level of request interrupt 1: intta2 level of request interrupt inttb1 (tmrb1) inttb0 (tmrb0) itb1c itb1m2 itb1m1 itb1m0 it b0c itb0m2 itb0m1 itb0m0 r r/w r r/w 0 0 0 0 0 0 0 0 intetb01 inttb0& inttb1 enable 00d8h 1: inttb1 level of request interrupt 1: inttb0 level of request interrupt ? inttbo0 ? ? ? ? itbo0c itbo0m2 itbo0m1 itbo0m0 ? ? r r/w ? ? ? ? 0 0 0 0 intetbo0 inttbo0 (overflow) enable 00dah always write ?0?. 1: inttbo0 level of request interrupt inttx0 intrx0 itx0c itx0m2 itx0m1 itx0m0 irx0c irx0m2 irx0m1 irx0m0 r r/w r r/w 0 0 0 0 0 0 0 0 intes0 intrx0& inttx0 enable 00dbh 1: inttx0 level of request interrupt 1: intrx0 level of request interrupt inttx1 intrx1 itx1c itx1m2 itx1m1 itx1m0 irx1c irx1m2 irx1m1 irx1m0 r r/w r r/w 0 0 0 0 0 0 0 0 intes1 intrx1& inttx1 enable 00dch 1: inttx1 level of request interrupt 1: intrx1 level of request interrupt ? intsbe0 ? ? ? ? isbe0c isbe0m2 isbe0m1 isbe0m0 ? ? r r/w ? ? ? ? 0 0 0 0 intesb0 intsbe0 enable 00e3h always write ?0?. 1: intsbe0 level of request interrupt intalm1 intalm0 ia1c ia1m2 ia1m1 ia1m0 ia0c ia0m2 ia0m1 ia0m0 r r/w r r/w 0 0 0 0 0 0 0 0 intealm01 intalm0 & intalm1 enable 00e5h 1: intalm1 level of request interrupt 1: intalm0 level of request interrupt intalm3 intalm2 ia3c ia3m2 ia3m1 ia3m0 ia2c ia2m2 ia2m1 ia2m0 r r/w r r/w 0 0 0 0 0 0 0 0 intealm23 intalm2 & intalm3 enable 00e6h 1: intalm3 level of request interrupt 1: intalm2 level of request interrupt
tmp92c820 2007-02-16 92c820-347 interrupt control (2/3) symbol name address 7 6 5 4 3 2 1 0 ? intalm4 ? ? ? ? ia4c ia4m2 ia4m1 ia4m0 ? ? r r/w ? ? ? ? 0 0 0 0 intealm4 intalm4 enable 00e7h always write ?0?. 1: intalm4 level of request interrupt ? intrtc ? ? ? ? irc irm2 irm1 irm0 ? ? r r/w ? ? ? ? 0 0 0 0 intertc intrtc enable 00e8h always write ?0?. 1: intrtc level of request interrupt ? intkey ? ? ? ? ikc ikm2 ikm1 ikm0 ? ? r r/w ? ? ? ? 0 0 0 0 inteckey intkey enable 00e9h always write ?0?. 1: intkey level of request interrupt ? intlcd ? ? ? ? ilcd1c ilcdm2 ilcdm1 ilcdm0 ? ? r r/w ? ? ? ? 0 0 0 0 intlcd intlcd enable 00eah always write ?0?. 1: intlcd level of request interrupt inttx2 intrx2 itx2c itx2m2 itx2m1 itx2m0 irx2c irx2m2 irx2m1 irx2m0 r r/w r r/w 0 0 0 0 0 0 0 0 intes2 intrx2& inttx2 enable 00edh 1: inttx2 level of request interrupt 1: intrx2 level of request interrupt ? intp0 ? ? ? ? ip0c ip0m2 ip0m1 ip0m0 ? ? r r/w ? ? ? ? 0 0 0 0 intep0 intp0 enable 00eeh always write ?0?. 1: intp0 level of request interrupt
tmp92c820 2007-02-16 92c820-348 interrupt control (3/3) symbol name address 7 6 5 4 3 2 1 0 intad int0 iadc iadm2 iadm1 iadm0 i0c i0m2 i0m1 i0m0 r r/w r r/w 0 0 0 0 0 0 0 0 inte0ad int0& intad enable 00f0h 1: intad level of request interrupt 1: int0 level of request interrupt inttc1 (dma1) inttc0 (dma0) itc1c itc1m2 itc1m1 itc1m0 itc0c itc0m2 itc0m1 itc0m0 r r/w r r/w 0 0 0 0 0 0 0 0 intetc01 inttc0& inttc1 enable 00f1h 1: inttc1 level of request interrupt 1: inttc0 level of request interrupt inttc3 (dma3) inttc2 (dma2) itc3c itc3m2 itc3m1 itc3m0 itc2c itc2m2 itc2m1 itc2m0 r r/w r r/w 0 0 0 0 0 0 0 0 intetc23 inttc2& inttc3 enable 00f2h 1: inttc3 level of request interrupt 1: inttc2 level of request interrupt inttc5 (dma5) inttc4 (dma4) itc5c itc5m2 itc5m1 itc5m0 itc4c itc4m2 itc4m1 itc4m0 r r/w r r/w 0 0 0 0 0 0 0 0 intetc45 inttc4& inttc5 enable 00f3h 1: inttc5 level of request interrupt 1: inttc4 level of request interrupt inttc7 (dma7) inttc6 (dma6) itc7c itc7m2 itc7m1 itc7m0 itc6c itc6m2 itc6m1 itc6m0 r r/w r r/w 0 0 0 0 0 0 0 0 intetc67 inttc6& inttc7 enable 00f4h 1: inttc7 level of request interrupt 1: inttc6 level of request interrupt ir2le ir1le ir0le w 1 1 1 simc sio interrupt mode control 00f5h (prohibit rmw) 0: intrx2 edge mode 1: intrx2 level mode 0: intrx1 edge mode 1: intrx1 level mode 0: intrx0 edge mode 1: intrx0 level mode i3edge i2edge i1edge i0edge i0le ? w r/w 0 0 0 0 0 0 iimc interrupt input mode control 00f6h (prohibit rmw) int3edge 0: rising 1: falling int2edge 0: rising 1: falling int1edge 0: rising 1: falling int0edge 0: rising 1: falling 0: int0 edge mode 1: int0 l level mode always write ?0?. ? intwd ? ? ? ? itcwd ? ? ? ? ? r ? ? ? ? ? 0 ? ? ? intwdt intwd 00f7h always write ?0?. 1: i ntwd ? clrv7 clrv6 clrv5 clrv4 clrv3 clrv2 clrv1 clrv0 w 0 0 0 0 0 0 0 0 intclr interrupt clear control 00f8h (prohibit rmw) interrupt vector
tmp92c820 2007-02-16 92c820-349 (4) dma controller symbol name address 7 6 5 4 3 2 1 0 dma0v5 dma0v4 dma0v3 dma0v2 dma0v1 dma0v0 r/w 0 0 0 0 0 0 dma0v dma0 start vector 0100h dma0 start vector dma1v5 dma1v4 dma1v3 dma1v2 dma1v1 dma1v0 r/w 0 0 0 0 0 0 dma1v dma1 start vector 0101h dma1 start vector dma2v5 dma2v4 dma2v3 dma2v2 dma2v1 dma2v0 r/w 0 0 0 0 0 0 dma2v dma2 start vector 0102h dma2 start vector dma3v5 dma3v4 dma3v3 dma3v2 dma3v1 dma3v0 r/w 0 0 0 0 0 0 dma3v dma3 start vector 0103h dma3 start vector dma4v5 dma4v4 dma4v3 dma4v2 dma4v1 dma4v0 r/w 0 0 0 0 0 0 dma4v dma4 start vector 0104h dma4 start vector dma5v5 dma5v4 dma5v3 dma5v2 dma5v1 dma5v0 r/w 0 0 0 0 0 0 dma5v dma5 start vector 0105h dma5 start vector dma6v5 dma6v4 dma6v3 dma6v2 dma6v1 dma6v0 r/w 0 0 0 0 0 0 dma6v dma6 start vector 0106h dma6 start vector dma7v5 dma7v4 dma7v3 dma7v2 dma7v1 dma7v0 r/w 0 0 0 0 0 0 dma7v dma7 start vector 0107h dma7 start vector dbst7 dbst6 dbst5 dbst4 d bst3 dbst2 dbst1 dbst0 r/w 0 0 0 0 0 0 0 0 dmab dma burst 0108h 1: dma request on burst mode dreq7 dreq6 dreq5 dreq4 dre q3 dreq2 dreq1 dreq0 r/w 0 0 0 0 0 0 0 0 dmar dma request 0109h (prohibit rmw) 1: dma request in software
tmp92c820 2007-02-16 92c820-350 (5) memory controller (1/3) symbol name address 7 6 5 4 3 2 1 0 b0ww2 b0ww1 b0ww0 b0wr2 b0wr1 b0wr0 w w 0 1 0 0 1 0 b0csl block0 memc control register low 0140h (prohibit rmw) write waits 001: 2 states (0 waits) 010: 3 states (1 wait) 101: 4 states (2 waits) 110: 5 states (3 waits) 111: 6 states (4 waits) 011: wait pin input mode others: (reserved) read waits 001: 2 states (0 waits) 010: 3 states (1 wait) 101: 4 states (2 waits) 110: 5 states (3 waits) 111: 6 states (4 waits) 011: wait pin input mode others: (reserved) b0e b0rec b0om1 b0om0 b0bus1 b0bus0 w w 0 0 0 0 0 0 b0csh block0 memct control register high 0141h (prohibit rmw) cs select 0: disable 1: enable 0: no insert dummy cycle (default) 1: insert dummy cycle 00: rom/sram 01: reserved 10: reserved 11: reserved data bus width 00: 8 bits 01: 16 bits 10: 32 bits 11: reserved b1ww2 b1ww1 b1ww0 b1wr2 b1wr1 b1wr0 w w 0 1 0 0 1 0 b1csl block1 memc control register low 0144h (prohibit rmw) write waits 001: 2 states (0 waits) 010: 3 states (1 wait) 101: 4 states (2 waits) 110: 5 states (3 waits) 111: 6 states (4 waits) 011: wait pin input mode others: (reserved) read waits 001: 2 states (0 waits) 010: 3 states (1 wait) 101: 4 states (2 waits) 110: 5 states (3 waits) 111: 6 states (4 waits) 011: wait pin input mode others: (reserved) b1e b1rec b1om1 b1om0 b1bus1 b1bus0 w w 0 0 0 0 0 0 b1csh block1 memc control register high 0145h (prohibit rmw) cs select 0: disable 1: enable 0: no insert dummy cycle (default) 1: insert dummy cycle 00: rom/sram 01: reserved 10: reserved 11: sdram data bus width 00: 8 bits 01: 16 bits 10: 32 bits 11: reserved b2ww2 b2ww1 b2ww0 b2wr2 b2wr1 b2wr0 w w 0 1 0 0 1 0 b2csl block2 memc control register low 0148h (prohibit rmw) write waits 001: 2 states (0 waits) 010: 3 states (1 wait) 101: 4 states (2 waits) 110: 5 states (3 waits) 111: 6 states (4 waits) 011: wait pin input mode others: (reserved) read waits 001: 2 states (0 waits) 010: 3 states (1 wait) 101: 4 states (2 waits) 110: 5 states (3 waits) 111: 6 states (4 waits) 011: wait pin input mode others: (reserved) b2e b2m b2rec b2om1 b2om0 b2bus1 b2bus0 w w 1 0 0 0 0 0/1 0/1 b2csh block2 memc control register high 0149h (prohibit rmw) cs select 0: disable 1: enable 0: 16 mbytes 1: sets area 0: no insert dummy cycle (default) 1: insert dummy cycle 00: rom/sram 01: reserved 10: reserved 11: reserved data bus width 00: 8 bits 01: 16 bits 10: 32 bits 11: reserved
tmp92c820 2007-02-16 92c820-351 memory controller (2/3) symbol name address 7 6 5 4 3 2 1 0 b3ww2 b3ww1 b3ww0 b3wr2 b3wr1 b3wr0 w w 0 1 0 0 1 0 b3csl block3 memc control register low 014ch (prohibit rmw) write waits 001: 2 states (0 waits) 010: 3 states (1 wait) 101: 4 states (2 waits) 110: 5 states (3 waits) 111: 6 states (4 waits) 011: wait pin input mode others: (reserved) read waits 001: 2 states (0 waits) 010: 3 states (1 wait) 101: 4 states (2 waits) 110: 5 states (3 waits) 111: 6 states (4 waits) 011: wait pin input mode others: (reserved) b3e b3rec b3om1 b3om0 b3bus1 b3bus0 w w 0 0 0 0 0 0 b3csh block3 memc control register high 014dh (prohibit rmw) cs select 0: disable 1: enable 0: no insert dummy cycle (default) 1: insert dummy cycle 00: rom/sram 01: reserved 10: reserved 11: reserved data bus width 00: 8 bits 01: 16 bits 10: 32 bits 11: reserved bexww2 bexww1 bexww0 bexwr2 bexwr1 bexwr0 w w 0 1 0 0 1 0 bexcsl block ex memc control register low 0158h prohibit rmw write waits 001: 2 states (0 waits) 010: 3 states (1 wait) 101: 4 states (2 waits) 110: 5 states (3 waits) 111: 6 states (4 waits) 011: wait pin input mode others: (reserved) read waits 001: 2 states (0 waits) 010: 3 states (1 wait) 101: 4 states (2 waits) 110: 5 states (3 waits) 111: 6 states (4 waits) 011: wait pin input mode others: (reserved) bexom1 bexom0 bexbus1 bexbus0 w 0 0 0 0 bexcsh block ex memc control register high 0159h (prohibit rmw) 00: rom/sram 01: reserved 10: reserved 11: reserved data bus width 00: 8 bits 01: 16 bits 10: 32 bits 11: reserved opge opwr1 opwr0 pr1 pr0 r/w 0 0 0 1 0 pmemcr page rom control register 0166h rom page access 0: disable 1: enable wait number on page 00: 1 state (n-1-1-1 mode) 01: 2 states (n-2-2-2 mode) 10: 3 states (n-3-3-3 mode) 11: (reserved) byte number in a page 00: 64 bytes 01: 32 bytes 10: 16 bytes (default) 11: 8 bytes
tmp92c820 2007-02-16 92c820-352 memory control (3/3) symbol name address 7 6 5 4 3 2 1 0 m0v20 m0v19 m0v18 m0v17 m0v16 m0v15 m0v14-9 m0v8 r/w 1 1 1 1 1 1 1 1 mamr0 memory register 0 0142h 0: compare enable 1: compare disable m0s23 m0s22 m0s21 m0s20 m0s19 m0s18 m0s17 m0s16 r/w 1 1 1 1 1 1 1 1 msar0 memory start address register 0 0143h set start address a23 to a16 m1v21 m1v20 m1v19 m1v18 m1v17 m1v16 mv15-9 m1v8 r/w 1 1 1 1 1 1 1 1 mamr1 memory address mask register 1 0146h 0: compare enable 1: compare disable m1s23 m1s22 m1s21 m1s20 m1s19 m1s18 m1s17 m1s16 r/w 1 1 1 1 1 1 1 1 msar1 memory start address register 1 0147h set start address a23 to a16 m2v22 m2v21 m2v20 m2v19 m2v18 m2v17 m2v16 m2v15 r/w 1 1 1 1 1 1 1 1 mamr2 memory register 2 014ah 0: compare enable 1: compare disable m2s23 m2s22 m2s21 m2s20 m2s19 m2s18 m2s17 m2s16 r/w 1 1 1 1 1 1 1 1 msar2 memory start address register 2 014bh set start address a23 to a16 m3v22 m3v21 m3v20 m3v19 m3v18 m3v17 m3v16 m3v15 r/w 1 1 1 1 1 1 1 1 mamr3 memory register 3 014eh 0: compare enable 1: compare disable m3s23 m3s22 m3s21 m3s20 m3s19 m3s18 m3s17 m3s16 r/w 1 1 1 1 1 1 1 1 msar3 memory start address register 3 014fh set start address a23 to a16
tmp92c820 2007-02-16 92c820-353 (6) mmu symbol name address 7 6 5 4 3 2 1 0 l0e l0ea22 l0ea21 l0ea20 r/w r/w 0 0 0 0 local0 local0 register 01d0h use bank for local0 0: not use 1: use setting bank number for local0 l1e l1ea23 l1ea22 l1ea21 r/w r/w 0 0 0 0 local1 local1 register 01d1h use bank for local1 0: not use 1: use setting bank number for local1 l2e l2ea23 l2ea22 l2ea21 r/w r/w 0 0 0 0 local2 local2 register 01d2h use bank for local2 0: disable 1: enable setting bank number for local2 l3e l3ea26 l3ea25 l3ea24 l3ea23 l3ea22 r/w r/w 0 0 0 0 0 0 local3 local3 register 01d3h use bank for local3 0: disable 1: enable 00000 to 00011: cs2b 00100 to 00111: cs2c 01000 to 01011: cs2d 01100 to 01111: cs2e 10000 to 10011: cs2f 10100 to 10111: cs2g 11000 to 11111: set prohibition
tmp92c820 2007-02-16 92c820-354 (7) clock gear (1/2) symbol name address 7 6 5 4 3 2 1 0 xen xten wuef r/w r/w 1 1 0 syscr0 system clock control register 0 10e0h high- frequency oscillator (fc) 0: stop 1: oscillation low- frequency oscillator (fs) 0: stop 1: oscillation warm-up timer 0: write don?t care 1: write start timer 0: read end warm up 1: read do not end warm up sysck gear2 gear1 gear0 r/w 0 1 0 0 syscr1 system clock control register 1 10e1h select system clock 0: fc 1: fs select gear value of high frequency (fc) 000: fc 001: fc/2 010: fc/4 011: fc/8 100: fc/16 101: (reserved) 110: (reserved) 111: (reserved) ? wuptm1 wuptm0 haltm1 haltm0 seldrv drve r/w r/w 0 1 0 1 1 0 0 syscr2 system clock control register 2 10e2h always write ?0?. warm-up timer 00: reserved 01: 2 8 /inputted frequency 10: 2 14 /inputted frequency 11: 2 16 /inputted frequency halt mode 00: reserved 01: stop mode 10: idle1 mode 11: idle2 mode mode select 0: stop 1: idle1 pin state control in stop/ idle1 mode 0: i/o off 1: remains the state before halt
tmp92c820 2007-02-16 92c820-355 clock gear (2/2) symbol name address 7 6 5 4 3 2 1 0 protect extin drvosch drvoscl r r/w 0 0 1 1 emccr0 emc control register 0 10e3h protect flag 0: off 1: on 1: external clock fc oscillator driver ability 1: normal 0: weak fs oscillator driver ability 1: normal 0: weak emccr1 emc control register 1 10e4h emccr2 emc control register 2 10e5h switching the protect on/off by write to following 1st-key, 2nd-key 1st-key: emccr1 = 5ah, emccr2 = a5h in succession write 2nd-key: emccr1 = a5h, emccr2 = 5ah in succession write
tmp92c820 2007-02-16 92c820-356 (8) lcd controller (1/6) symbol name address 7 6 5 4 3 2 1 0 bae aae scpw1 scpw0 ta3lcdck bulk ramtype mode r/w 0 0 1 0 0 0 0 0 lcdmode lcd mode register 0200h used by b area 0: disable 1: enable used by a area 0: disable 1: enable scp width 00: basescp 01: 2 clocks 10: 4 clocks 11: 8 clocks select low frequency 0: fs (32 khz) 1: ta3out byte- number/ common 0: 512 bytes 1: 1024 bytes display ram selection 0: sram 1: sdram mode selection 0: ram 1: sr fmn7 fmn6 fmn5 fmn4 fmn3 fmn2 fmn1 fmn0 r/w 0 0 0 0 0 0 0 0 lcddvm divide frm register 0201h setting dvm bit7 to 0 com3 com2 com1 com0 seg3 seg2 seg1 seg0 r/w 0 0 0 0 0 0 0 0 lcdsize lcd size register 0202h setting the lcd common number for sr mode 000: 128 0101: 400 0001: 160 0110: 480 0010: 200 0011: 240 0100: 320 others: reserved setting the lcd segment number for sr mode 0000: 128 0101: 480 0001: 160 0110: 560 0010: 240 0111: 640 0011: 320 0100: 400 others: reserved lcdon all0 frmon ? fp9 mmulcd fp8 start r/w 0 0 0 0 0 0 0 0 lcdctl lcd control register 0203h doff port 0: off 1: on ld bus output control 0: off ( = normal ) 1: on ( = all 0) divided fr mode 0: disable 1: enable always write ?0?. setting bit 9 for f fp [9:0] type selection of lcd driver with built-in ram 0: sequentia l access 1:random access setting bit 8 for f fp [9:0] start control in sr mode 0: stop 1: start fp7 fp6 fp5 fp4 fp3 fp2 fp1 fp0 r/w 0 0 0 0 0 0 0 0 lcdffp lcd frequency register 0204h f fp set value bit7 to 0 gray1 gray0 r/w 0 0 lcdgl lcd gray level register 0205h 00: monochrome 01: 4 levels 10: 8 levels 11: 16 levels
tmp92c820 2007-02-16 92c820-357 lcd controller (2/6) symbol name address 7 6 5 4 3 2 1 0 cde ccs cbe1 cbe0 r/w r/w 0 0 0 0 lcdcm lcd cursor mode register 0206h cursor 0: off 1: on cursor color 0: white 1: black cursor blink interval 00: don?t blink 01: 2 hz 10: 1 hz 11: 0.5 hz cw4 cw3 cw2 cw1 cw0 r/w 0 0 0 0 0 lcdcw lcd cursor width register 0207h cursor width (x size) 00000: 1 dot (min) 11111: 32 dots (max) ch4 ch3 ch2 ch1 ch0 r/w 0 0 0 0 0 lcdch lcd cursor height register 0208h cursor height (y size) 00000: 1 dot (min) 11111: 32 dots (max) apb3 apb2 apb1 apb0 r/w 0 0 0 0 lcdcp lcd cursor apb register 0209h setting bit3 to 0 for cursor absolute position cap7 cap6 cap5 cap4 cap3 cap2 cap1 cap0 r/w 0 0 0 0 0 0 0 0 lcdcpl lcd cursor ap register low 020ah setting bit7 to 0 for cu rsor absolute position cap15 cap14 cap13 cap12 cap11 cap10 cap9 cap8 r/w 0 0 0 0 0 0 0 0 lcdcpm lcd cursor ap register medium 020bh setting bit15 to 8 for cursor absolute position cap23 cap22 cap21 cap20 cap19 cap18 cap17 cap16 r/w 0 1 0 0 0 0 0 0 lcdcph lcd cursor ap register high 020ch setting bit23 to 16 for cursor absolute position
tmp92c820 2007-02-16 92c820-358 lcd controller (3/6) symbol name address 7 6 5 4 3 2 1 0 sa15 sa14 sa13 sa12 sa11 sa10 sa9 sa8 r/w 0 0 0 0 0 0 0 0 lsaram a area start address register medium 0210h setting start address a15 to a8 for the source data memory in a area sa23 sa22 sa21 sa20 sa19 sa18 sa17 sa16 r/w 0 1 0 0 0 0 0 0 lsarah a area start address register high 0211h setting start address a23 to a16 for the source data memory in a area ea15 ea14 ea13 ea12 ea11 ea10 ea9 ea8 r/w 0 0 0 0 0 0 0 0 learam a area end address register medium 0212h setting end address a15 to a8 for the source data memory in a area ea23 ea22 ea21 ea20 ea19 ea18 ea17 ea16 r/w 0 1 0 0 0 0 0 0 learah a area end address register high 0213h setting end address a23 to a16 for the source data memory in a area sa15 sa14 sa13 sa12 sa11 sa10 sa9 sa8 r/w 0 0 0 0 0 0 0 0 lsarbm b area start address register medium 0214h setting start address a15 to a8 for the source data memory in b area sa23 sa22 sa21 sa20 sa19 sa18 sa17 sa16 r/w 0 1 0 0 0 0 0 0 lsarbh b area start address register high 0215h setting start address a23 to a16 for the source data memory in b area ea15 ea14 ea13 ea12 ea11 ea10 ea9 ea8 r/w 0 0 0 0 0 0 0 0 learbm b area end address register medium 0216h setting end address a15 to a8 for the source data memory in b area ea23 ea22 ea21 ea20 ea19 ea18 ea17 ea16 r/w 0 1 0 0 0 0 0 0 learbh b area end address register high 0217h setting end address a23 to a16 for the source data memory in b area sa7 sa6 sa5 sa4 sa3 sa2 sa1 sa0 r/w 0 0 0 0 0 0 0 0 lsarcl c area start address register low 0218h setting start address a7 to a0 for the source data memory in c area sa15 sa14 sa13 sa12 sa11 sa10 sa9 sa8 r/w 0 0 0 0 0 0 0 0 lsarcm c area start address register medium 0219h setting start address a15 to a8 for the source data memory in c area sa23 sa22 sa21 sa20 sa19 sa18 sa17 sa16 r/w 0 1 0 0 0 0 0 0 lsarch c area start address register high 021ah setting start address a23 to a16 for the source data memory in c area
tmp92c820 2007-02-16 92c820-359 lcd controller (4/6) symbol name address 7 6 5 4 3 2 1 0 ? ? ? ? ? ? ? ? r/w 0 0 0 0 0 0 0 0 lg0l lcd gray level data setting register low 0220h ? ? ? ? ? ? ? ? r/w 0 0 0 0 0 0 0 0 lg0h lcd gray level data setting register high 0221h ? ? ? ? ? ? ? ? r/w 0 0 0 0 0 0 0 0 lg1l lcd gray level data setting register low 0222h ? ? ? ? ? ? ? ? r/w 1 0 0 0 0 0 0 0 lg1h lcd gray level data setting register high 0223h ? ? ? ? ? ? ? ? r/w 1 0 0 0 0 0 0 0 lg2l lcd gray level data setting register low 0224h ? ? ? ? ? ? ? ? r/w 1 0 0 0 0 0 0 0 lg2h lcd gray level data setting register high 0225h ? ? ? ? ? ? ? ? r/w 1 0 0 0 0 0 0 0 lg3l lcd gray level data setting register low 0226h ? ? ? ? ? ? ? ? r/w 1 0 0 0 1 0 0 0 lg3h lcd gray level data setting register high 0227h ? ? ? ? ? ? ? ? r/w 1 0 0 0 1 0 0 0 lg4l lcd gray level data setting register low 0228h ? ? ? ? ? ? ? ? r/w 1 0 0 0 1 0 0 0 lg4h lcd gray level data setting register high 0229h ? ? ? ? ? ? ? ? r/w 1 0 0 0 1 0 1 0 lg5l lcd gray level data setting register low 022ah ? ? ? ? ? ? ? ? r/w 1 0 0 0 1 0 0 0 lg5h lcd gray level data setting register high 022bh ? ? ? ? ? ? ? ? r/w 1 0 0 0 1 0 1 0 lg6l lcd gray level data setting register low 022ch ? ? ? ? ? ? ? ? r/w 1 0 0 0 1 0 1 0 lg6h lcd gray level data setting register high 022dh
tmp92c820 2007-02-16 92c820-360 lcd controller (5/6) symbol name address 7 6 5 4 3 2 1 0 ? ? ? ? ? ? ? ? r/w 1 0 1 0 1 0 1 0 lg7l lcd gray level data setting register low 022eh ? ? ? ? ? ? ? ? r/w 1 0 0 0 1 0 1 0 lg7h lcd gray level data setting register high 022fh ? ? ? ? ? ? ? ? r/w 1 0 1 0 1 0 1 0 lg8l lcd gray level data setting register low 0230h ? ? ? ? ? ? ? ? r/w 1 0 1 0 1 0 1 0 lg8h lcd gray level data setting register high 0231h ? ? ? ? ? ? ? ? r/w 0 1 0 1 0 1 0 1 lg9l lcd gray level data setting register low 0232h ? ? ? ? ? ? ? ? r/w 1 1 0 1 0 1 0 1 lg9h lcd gray level data setting register high 0233h ? ? ? ? ? ? ? ? r/w 1 1 0 1 0 1 0 1 lgal lcd gray level data setting register low 0234h ? ? ? ? ? ? ? ? r/w 1 1 0 1 0 1 0 1 lgah lcd gray level data setting register high 0235h ? ? ? ? ? ? ? ? r/w 1 1 0 1 0 1 0 1 lgbl lcd gray level data setting register low 0236h ? ? ? ? ? ? ? ? r/w 1 1 0 1 1 1 0 1 lgbh lcd gray level data setting register high 0237h ? ? ? ? ? ? ? ? r/w 1 1 0 1 1 1 0 1 lgcl lcd gray level data setting register low 0238h ? ? ? ? ? ? ? ? r/w 1 1 0 1 1 1 0 1 lgch lcd gray level data setting register high 0239h ? ? ? ? ? ? ? ? r/w 1 1 0 1 1 1 0 1 lgdl lcd gray level data setting register low 023ah ? ? ? ? ? ? ? ? r/w 1 1 1 1 1 1 0 1 lgdh lcd gray level data setting register high 023bh
tmp92c820 2007-02-16 92c820-361 lcd controller (6/6) symbol name address 7 6 5 4 3 2 1 0 ? ? ? ? ? ? ? ? r/w 1 1 0 1 1 1 0 1 lgel lcd gray level data setting register low 023ch ? ? ? ? ? ? ? ? r/w 1 1 0 1 1 1 0 1 lgeh lcd gray level data setting register high 023dh ? ? ? ? ? ? ? ? r/w 1 1 1 1 1 1 1 1 lgfl lcd gray level data setting register low 023eh ? ? ? ? ? ? ? ? r/w 1 1 1 1 1 1 1 1 lgfh lcd gray level data setting register high 023fh
tmp92c820 2007-02-16 92c820-362 (9) sdram controller symbol name address 7 6 5 4 3 2 1 0 sdini sdbus1 sdbu0 smuxw1 smuxw0 smac r/w r/w r/w 0 0 0 0 0 0 sdacr sdram address control 0250h auto initialize 0: disable 1: enable selecting structure of data bus 00: 16 bits 1 01: 16 bits 2 10: 32 bits 1 selecting address multiplex type 00: type a 01: type b 10: type c 11: reserved sdram controller 0: disable 1: enable sfrc srs2 srs1 srs0 sasfrc src r/w r/w 0 0 0 0 0 0 sdrcr sdram refresh control 0251h self refresh 0: disable 1: enable refresh interval 000: 78 states 100: 195 states 001: 97 states 101: 210 states 010: 124 states 110: 249 states 011: 156 states 111: 312 states auto/self refresh 0: disable 1: enable interval refresh 0: disable 1: enable
tmp92c820 2007-02-16 92c820-363 (10) 8-bit timer symbol name address 7 6 5 4 3 2 1 0 ta0rde i2ta01 ta01prun ta1run ta0run r/w r/w 0 0 0 0 0 tmra01 prescaler up counter (uc1) up counter (uc0) ta01run tmra01 run register 1100h double buffer 0: disable 1: enable idle2 0: stop 1: operate 0: stop and clear 1: run (count up) ? w ta0reg 8-bit timer register 0 1102h prohibit rmw undefined ? w ta1reg 8-bit timer register 1 1103h prohibit rmw undefined ta01m1 ta01m0 pwm01 pwm00 ta1clk1 ta1clk0 ta0clk1 ta0clk0 r/w 0 0 0 0 0 0 0 0 ta01mod tmra01 mode register 1104h operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit ppg mode 11: 8-bit pwm mode pwm cycle 00: reserved 01: 2 6 10: 2 7 11: 2 8 source clock for tmra1 00: ta0trg 01: t1 10: t16 11: t256 source clock for tmra0 00: ta0in pin 01: t1 10: t4 11: t16 ta1ffc1 ta1ffc0 ta1ffie ta1ffis w r/w 1 1 0 0 ta1ffcr tmra1 flip-flop control register 1105h prohibit rmw 00: invert ta1ff 01: set ta1ff 10: clear ta1ff 11: don?t care ta1ff control for inversion 0: disable 1: enable ta1ff inversion select 0: tmra0 1: tmra1 ta2rde i2ta23 ta23prun ta3run ta2run r/w r/w 0 0 0 0 0 tmra23 prescaler up counter (uc3) up counter (uc2) ta23run tmra23 run register 1108h double buffer 0: disable 1: enable idle2 0: stop 1: operate 0: stop and clear 1: run (count up) ? w ta2reg 8-bit timer register 2 110ah prohibit rmw undefined ? w ta3reg 8-bit timer register 3 110bh prohibit rmw undefined ta23m1 ta23m0 pwm21 pwm20 ta3clk1 ta3clk0 ta2clk1 ta2clk0 r/w 0 0 0 0 0 0 0 0 ta23mod tmra23 mode register 110ch operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit ppg mode 11: 8-bit pwm mode pwm cycle 00: reserved 01: 2 6 10: 2 7 11: 2 8 source clock for tmra1 00: ta2trg 01: t1 10: t16 11: t256 source clock for tmra2 00: reserved 01: t1 10: t4 11: t16 ta3ffc1 ta3ffc0 ta3ffie ta3ffis w r/w 1 1 0 0 ta3ffcr tmra3 flip-flop control register 110dh prohibit rmw 00: invert ta3ff 01: set ta3ff 10: clear ta3ff 11: don?t care ta3ff control for inversion 0: disable 1: enable ta3ff inversion select 0: tmra2 1: tmra3
tmp92c820 2007-02-16 92c820-364 (11) 16-bit timer symbol name address 7 6 5 4 3 2 1 0 tb0rde ? i2tb0 tb0prun tb0run r/w r/w r/w 0 0 0 0 0 tmrb0 prescaler up counter (uc10) tb0run tmrb0 run register 1180h double buffer 0: disable 1: enable always write ?0?. idle2 0: stop 1: operate 0: stop and clear 1: run (count up) ? ? tb0cp0i tb0cpm1 tb0cpm0 tb0cle tb0clk1 tb0clk0 r/w w r/w 0 0 1 0 0 0 0 0 tb0mod tmrb0 mode register 1182h prohibit rmw always write ?0?. execute software capture 0: software capture 1: undefined capture timing 00: disable 01: reserved 10: reserved 11: ta1out ta1out control up counter 0: disable clearing 1: enable clearing tmrb0 source clock 00: reserved 01: t1 10: t4 11: t16 ? ? tb0c1t1 tb0c0t1 tb0e1t1 tb0e0t1 tb0ff0c1 tb0ff0c0 w r/w w * 1 1 0 0 0 0 1 1 tb0ff0 inversion trigger 0: disable trigger 1: enable trigger tb0ffcr tmrb0 flip-flop control register 1183h prohibit rmw always write ?11?. invert when the uc10 value is loaded in to tb0cp1h/l. invert when the uc10 value is loaded in to tb0cp0h/l. invert when the uc10 value matches the value in tb0rg1h/l. invert when the uc10 value matches the value in tb0rg0h/l. control tb0ff0 00: invert 01: set 10: clear 11: don?t care * always read as 11. ? w tb0rg0l 16-bit timer register 0 low 1188h prohibit rmw undefined ? w tb0rg0h 16-bit timer register 0 high 1189h prohibit rmw undefined ? w tb0rg1l 16-bit timer register 1 low 118ah prohibit rmw undefined ? w tb0rg1h 16-bit timer register 1 high 118bh prohibit rmw undefined ? r tb0cp0l capture register 0 low 118ch undefined ? r tb0cp0h capture register 0 high 118dh undefined ? r tb0cp1l capture register 1 low 118eh undefined ? r tb0cp1h capture register 1 high 118fh undefined
tmp92c820 2007-02-16 92c820-365 (12) uart/serial channel (1/3) symbol name address 7 6 5 4 3 2 1 0 rb7 tb7 rb6 tb6 rb5 tb5 rb4 tb4 rb3 tb3 rb2 tb2 rb1 tb1 rb0 tb0 r (receiving)/w (transmission) sc0buf serial channel 0 buffer register 1200h prohibit rmw undefined rb8 even pe oerr perr ferr sclks ioc r r/w r (clear to 0 after reading) r/w undefined 0 0 0 0 0 0 0 1: error sc0cr serial channel 0 control register 1201h receive data bit8 parity 0: odd 1: even parity 0: disable 1: enable overrun parity framing 0: sclk0 1: sclk0 0: baud rate generator 1: sclk0 pin input tb8 ctse rxe wu sm1 sm0 sc1 sc0 r/w 0 0 0 0 0 0 0 0 sc0mod0 serial channel 0 mode 0 register 1202h trans- mission data bit8 0: cts disable 1: cts enable 0: receive disable 1: receive enable wakeup 0: disable 1: enable 00: i/o interface mode 01: 7-bit uart mode 10: 8-bit uart mode 11: 9-bit uart mode 00: ta0trg 01: baud rate generator 10: internal clock f io 11: external clock (sclk0 input) ? br0adde br0ck1 br0ck0 br0s3 br0s2 br0s1 br0s0 r/w 0 0 0 0 0 0 0 0 br0cr serial channel 0 baud rate control register 1203h always write ?0?. (16 ? k)/16 divided 0: disable 1: enable 00: t0 01: t2 10: t8 11: t32 divided frequency setting br0k3 br0k2 br0k1 br0k0 r/w 0 0 0 0 br0add serial channel 0 k setting register 1204h sets frequency divisor ?k? (divided by n + (16 ? k)/16). i2s0 fdpx0 r/w r/w 0 0 sc0mod1 serial channel 0 mode 1 register 1205h idle2 0: stop 1: operate duplex 1: full duplex 0: half duplex plsel rxsel txen rxen sirwd3 sirwd2 sirwd1 sirwd0 r/w 0 0 0 0 0 0 0 0 sircr irda control register 1207h select transmit pulse width 0: 3/16 1: 1/16 receive data 0: ?h? pulse 1: ?l? pulse transmit 0: disable 1: enable receive 0: disable 1: enable select receive pulse width set effective pulse width for equal or more than 2x (value + 1) + 100ns can be set: 1 to 14 can not be set: 0 and 15
tmp92c820 2007-02-16 92c820-366 uart/serial channel (2/3) symbol name address 7 6 5 4 3 2 1 0 rb7 tb7 rb6 tb6 rb5 tb5 rb4 tb4 rb3 tb3 rb2 tb2 rb1 tb1 rb0 tb0 r (receiving)/w (transmission) sc1buf serial channel 1 buffer register 1208h prohibit rmw undefined rb8 even pe oerr perr ferr sclks ioc r r/w r (clear to 0 after reading) r/w undefined 0 0 0 0 0 0 0 1: error sc1cr serial channel 1 control register 1209h receive data bit8 parity 0: odd 1: even parity 0: disable 1: enable overrun parity framing 0: sclk1 1: sclk1 0: baud rate generator 1: sclk1 pin input tb8 ctse rxe wu sm1 sm0 sc1 sc0 r/w 0 0 0 0 0 0 0 0 sc1mod0 serial channel 1 mode 0 register 120ah trans- mission data bit8 0: cts disable 1: cts enable 0: receive disable 1: receive enable wakeup 0: disable 1: enable 00: i/o interface mode 01: 7-bit uart mode 10: 8-bit uart mode 11: 9-bit uart mode 00: ta0trg 01: baud rate generator 10: internal clock f io 11: external clock (sclk1 input) ? br1adde br1ck1 br1ck0 br1s3 br1s2 br1s1 br1s0 r/w 0 0 0 0 0 0 0 0 br1cr serial channel 1 baud rate control register 120bh always write ?0?. (16 ? k)/16 divided 0: disable 1: enable 00: t0 01: t2 10: t8 11: t32 divided frequency setting br1k3 br1k2 br1k1 br1k0 r/w 0 0 0 0 br1add serial channel 1 k setting register 120ch sets frequency divisor ?k? (divided by n + (16 ? k)/16) i2s1 fdpx1 r/w 0 0 sc1mod1 serial channel 1 mode 1 register 120dh idle2 0: stop 1: operate duplex 1: full duplex 0: half duplex
tmp92c820 2007-02-16 92c820-367 uart/serial channel (3/3) symbol name address 7 6 5 4 3 2 1 0 rb7 tb7 rb6 tb6 rb5 tb5 rb4 tb4 rb3 tb3 rb2 tb2 rb1 tb1 rb0 tb0 r (receiving)/w (transmission) sc2buf serial channel 2 buffer register 1210h prohibit rmw undefined rb8 even pe oerr perr ferr ? ? r r/w r (clear to 0 after reading) r/w undefined 0 0 0 0 0 0 0 1:error sc2cr serial channel 2 control register 1211h receive data bit8 parity 0: odd 1: even parity 0: disable 1: enable overrun parity framing always write ?0?. always write ?0?. tb8 ? rxe wu sm1 sm0 sc1 sc0 r/w 0 0 0 0 0 0 0 0 sc2mod0 serial channel 2 mode 0 register 1212h trans- mission data bit8 always write ?0?. 0: receive disable 1: receive enable wakeup 0: disable 1: enable 00: i/o interface mode 01: 7-bit uart mode 10: 8-bit uart mode 11: 9-bit uart mode 00: ta0reg 01: baud rate generator 10: internal clock f io 11: reserved ? br2adde br2ck1 br2ck0 br2s3 br2s2 br2s1 br2s0 r/w 0 0 0 0 0 0 0 0 br2cr serial channel 2 baud rate control register 1213h always write ?0?. (16 ? k)/16 divided 0: disable 1: enable 00: t0 01: t2 10: t8 11: t32 divided frequency setting br2k3 br2k2 br2k1 br2k0 r/w 0 0 0 0 br2add serial channel 2 k setting register 1214h sets frequency divisor ?k? (divided by n + (16 ? k)/16) i2s2 fdpx2 r/w 0 0 sc2mod1 serial channel 2 mode 1 register 1215h idle2 0: stop 1: operate duplex 1: full duplex 0: half duplex
tmp92c820 2007-02-16 92c820-368 (13) i 2 c bus/serial channel (1/2) symbol name address 7 6 5 4 3 2 1 0 bc2 bc1 bc0 ack sck2 sck1 sck0/ swrmon w r/w w r/w 0 0 0 0 0 0 0/1 i 2 c mode 1240h (prohibit rmw) number of transfer bits 000: 8 001: 1 010: 2 011: 3 100: 4 101: 5 110: 6 111: 7 acknow -ledge mode 0: disable 1: enable setting of the divide value ?n? 000: 5 001: 6 010: 7 011: 8 100: 9 101: 10 110: 11 111: reserved sios sioinh siom1 siom0 sck2 sck1 sck0 w w 0 0 0 0 0 0 0 sbi0cr1 sbi0 control register 1 sio mode 1240h (prohibit rmw) transfer 0: stop 1: start transfer 0: continue 1: abort transfer mode 00: 8 bits transmit 10: 8 bits transmit/receive 11: 8 bits receive setting of the divide value ?n? 000: 4 001: 5 010: 6 011: 7 100: 8 101: 9 110: 10 111: external clock sck0 db7 db6 db5 db4 db3 db2 db1 db0 r (receiving)/w (transmission) sbi0dbr sbi0 buffer register 1241h (prohibit rmw) undefined sa6 sa5 sa4 sa3 sa2 sa1 sa0 als w 0 0 0 0 0 0 0 0 i2c0ar i 2 cbus0 address register 1242h (prohibit rmw) setting slave address address recognition 0: enable 1: disable mst trx bb pin sbim1 sbim0 swrst1 swrst0 w 0 0 0 1 0 0 0 0 i 2 c mode 1243h (prohibit rmw) 0: slave 1: master 0: receive 1: transmit start/stop condition generation 0: stop 1: start intsbe0 interrupt 0: request 1: cancel operation mode selection 00: port mode 01: sio mode 10: i 2 c mode 11: reserved software reset generate write ?10? and ?01?, then an internal reset signal is generated. sbim1 sbim0 ? ? w 0 0 0 0 sbi0cr2 sbi0 control register 2 sio mode 1243h (prohibit rmw) operation mode selection 00: port mode 01: sio mode 10: i 2 c mode 11: reserved a lways write ?0?. a lways write ?0?. mst trx bb pin al aas ad0 lrb r 0 0 0 1 0 0 0 0 i 2 c mode 1243h (prohibit rmw) 0: slave 1: master 0: receive 1: transmit bus status monitor 0: free 1: busy intsbe0 interrupt 0: request 1: cancel arbitration lost detection 1: detect slave address match detection monitor 1: detect general call detection 1: detect last receive bit monitor 0: 0 1: 1 siof sef r 0 0 sbi0sr sbi0 status register sio mode 1243h (prohibit rmw) transfer status 0: stopped 1: in progress shift status 0: stopped 1: in progress
tmp92c820 2007-02-16 92c820-369 i 2 c bus/serial channel (2/2) symbol name address 7 6 5 4 3 2 1 0 ? i2sbi0 w r/w 0 0 i 2 c mode 1244h (prohibit rmw) always write ?0?. idle2 0: stop 1: operate ? ? w r/w 0 0 sbi0br0 sbi0 baud rate register 0 sbi mode 1244h (prohibit rmw) always write ?0?. always write ?0?. p4en ? w 0 0 sbi0br1 sbi0 baud rate register 1 1245h (prohibit rmw) clock control 0: stop 1: operate always write ?0?.
tmp92c820 2007-02-16 92c820-370 (14) ad converter symbol name address 7 6 5 4 3 2 1 0 eocf adbf ? ? itm0 repet scan ads r r/w 0 0 0 0 0 0 0 0 admod0 ad mode control register 0 12b8h ad conversion end flag 1: end ad conversion busy flag 1: busy always write ?0?. always write ?0?. 0: every 1 time 1: every 4 times repeat mode 0: single mode 1: repeat mode scan mode 0: fixed channel mode 1: channel scan mode ad conversion start 1: start always read as ?0? vrefon i2ad ? ? ? adch2 adch1 adch0 r/w 0 0 0 0 0 0 0 0 admod1 ad mode control register 1 12b9h ladder resistance 0: off 1: on idle2 0: stop 1: operate always write ?0?. always write ?0?. always write ?0?. input channel 000: an0 an0 001: an1 an0 an1 010: an2 an0 an1 an2 011: an3 an0 an1 an2 an3 100: an4 an0 an1 an2 an3 an4 adtrg r/w 0 admod2 ad mode control register 1 12bah ad external trigger start control 0: disable 1: enable adr01 adr00 adr0rf r r adreg0l ad result register 0 low 12a0h undefined 0 adr09 adr08 adr07 adr06 adr05 adr04 adr03 adr02 r adreg0h ad result register 0 high 12a1h undefined adr11 adr10 adr1rf r r adreg1l ad result register 1 low 12a2h undefined 0 adr19 adr18 adr17 adr16 adr15 adr14 adr13 adr12 r adreg1h ad result register 1 high 12a3h undefined adr21 adr20 adr2rf r r adreg2l ad result register 2 low 12a4h undefined 0 adr29 adr28 adr27 adr26 adr25 adr24 adr23 adr22 r adreg2h ad result register 2 high 12a5h undefined adr31 adr30 adr3rf r r adreg3l ad result register 3 low 12a6h undefined 0 adr39 adr38 adr37 adr36 adr35 adr34 adr33 adr32 r adreg3h ad result register 3 high 12a7h undefined adr21 adr20 adr4rf r r adreg4l ad result register 4 low 12a8h undefined 0 adr29 adr28 adr27 adr26 adr25 adr24 adr23 adr22 r adreg4h ad result register 4 high 12a9h undefined
tmp92c820 2007-02-16 92c820-371 (15) watchdog timer symbol name address 7 6 5 4 3 2 1 0 wdte wdtp1 wdtp0 ? i2wdt rescr ? r/w r/w 1 0 0 0 0 0 0 wdmod wdt mode register 1300h wdt control 1: enable wdt select detecting time 00: 2 15 /f io 01: 2 17 /f io 10: 2 19 /f io 11: 2 21 /f io always write ?0?. idle2 0: stop 1: operate 1: internally connects wdt out to the reset pin always write ?0?. ? w ? wdcr wdt control register 1301h prohibit rmw b1h: wdt disable code 4eh: wdt clear code
tmp92c820 2007-02-16 92c820-372 (16) rtc (real time clock) symbol name address 7 6 5 4 3 2 1 0 se6 se5 se4 se3 se2 se1 se0 r/w undefined secr second register 1320h ?0? is read. 40 sec 20 sec 10 sec 8 sec 4 sec 2 sec 1 sec mi6 mi5 mi4 mi3 mi2 mi1 mi0 r/w undefined minr minute register 1321h ?0? is read. 40 min. 20 min. 10 min. 8 min. 4 min. 2 min. 1 min. ho5 ho4 ho3 ho2 ho1 ho0 r/w undefined hourr hour register 1322h ?0? is read. 20 hour (pm/am) 10 hour 8 hour 4 hour 2 hour 1 hour we2 we1 we0 r/w undefined dayr day register 1323h ?0? is read. w2 w1 w0 da5 da4 da3 da2 da1 da0 r/w undefined dater date register 1324h ?0? is read. 20 day 10 day 8 day 4 day 2 day 1 day mo4 mo3 mo2 mo1 mo0 r/w 1325h undefined page 0 ?0? is read. 10 month 8 month 4 month 2 month 1 month monthr month register page 1 ?0? is read. 0: indicator for 12 hours 1: indicator for 24 hours ye7 ye6 ye5 ye4 ye3 ye2 ye1 ye0 r/w 1326h undefined page 0 80 year 40 year 20 year 10 year 8 year 4 year 2 year 1 year yearr year register page 1 ?0? is read. leap year setting 00: leap year 01: one year after 10: tow year after 11: three year after intena adjust enatmr enaalm page r/w w r/w r/w 0 undefined undefined pager page register 1327h prohibit rmw intrtc 0:disable 1:enable ?0? is read. 0:don?t care 1:adjust clock 0:disable 1:enable alarm 0:disable 1:enable ?0? is read. page setting dis1hz dis16hz rsttmr rstalm re3 re2 re1 re0 w undefined restr reset register 1328h prohibit rmw 1 hz 0:disable 1:enable 16 hz 0:disable 1:enable 1: reset clock 1: reset alarm always write ?0?.
tmp92c820 2007-02-16 92c820-373 (17) melody/alarm generator symbol name address 7 6 5 4 3 2 1 0 al8 al7 al6 al5 al4 al3 al2 al1 r/w 0 0 0 0 0 0 0 0 alm alarm- pattern register 1330h alarm pattern set fc1 fc0 alminv ? ? ? ? melalm r/w r/w r/w r/w r/w r/w r/w 0 0 0 0 0 0 0 0 melalmc melody/ alarm control register 1331h free-run counter control 00: hold 01: restart 10: clear 11: clear & start alarm frequency invert 1: invert always write ?0?. output frequency 0: alarm 1: melody ml7 ml6 ml5 ml4 ml3 ml2 ml1 ml0 r/w 0 0 0 0 0 0 0 0 melfl melody frequency l-register 1332h melody frequency set (low 8 bits ) melon ml11 ml10 ml9 ml8 r/w r/w 0 0 0 0 0 melfh melody frequency h-register 1333h melody counter control 0: stop & clear 1: start melody frequency set (upper 4 bits) ? ialm4e ialm3e ialm2e ialm1e ialm0e r/w r/w 0 0 0 0 0 0 almint alarm interrupt enable register 1334h always write ?0?. intalm4 to intalm0 alarm interrupt enable
tmp92c820 2007-02-16 92c820-374 6. port section equivalent circuit diagram reading the circuit diagram basically, the gate symbols written are the same as those used for the standard cmos logic ic [74hcxx] series. the dedicated signal is described below. stop: this signal becomes active ?1? when the halt mode setting register is set to the stop mode and the cpu executes the halt instru ction. when the drive enable bit is set to ?1?, however, stop remains at ?0?. the input protection resistance ranges from several tens of ohms to several hundreds of ohms. d0 to d7, p1 (d8 to d15), p2 (d 16 to d23), p3 (d24 to d31), p4 (a0 to a7), p5 (a8 to a15), p6 (a16 to a23), p76 and pl0 to pl7 p90, p96, pc0, pc1, pc3, pc5, pc6, pf1, pf2, pf4, pf5 vcc output data output enable stop input data i/o input enable p-ch n-ch vcc output data output enable stop input data i/o input enable p-ch n-ch
tmp92c820 2007-02-16 92c820-375 p70 to p75, p80 to p87, p j0 to pj7, pk0 to pk4 and pk6 pa p91 (so/sda), p92 (si/scl), p93 and p94 p95 (txd2), pf0, pf3 vcc output data open-drain output enable stop input data i/o input enable p-ch n-ch input data input vcc vcc output data open-drain output enable stop input data i/o input enable p-ch n-ch vcc output p-ch n-ch output data stop
tmp92c820 2007-02-16 92c820-376 pg (an0 to an4) reset x1 and x2 xt1 and xt2 reset input vcc wdtout reset enable schmitt 100 k (typ.) a nalog input channel select analog input input data input input enable p-ch n-ch clock high-frequency oscillation enable x2 n-ch x1 p-ch oscillato r clock low-frequency oscillation enable xt2 n-ch xt1 p-ch oscillato r
tmp92c820 2007-02-16 92c820-377 vrefh and vrefl sdclk be am0 to am1 vref on vrefh p-ch vrefl string resistance output clkout1 vcc internal reset output enable p-ch n-ch p-ch vcc be input input data input
tmp92c820 2007-02-16 92c820-378 7. points to note and restrictions 7.1 notation (1) the notation for built-in/i/o registers is as follows register symbol example: ta01run denotes bit ta0run of register ta01run. (2) read-modify-write instructions (rmw) an instruction in which the cpu reads data from memory and writes the data to the same memory location in one instruction. example 1: set 3, (ta01run ); set bit3 of ta01run. example 2: inc 1, (100h); increment the data at 100h. ? examples of read-modify-write instructions on the tlcs-900 exchange instruction ex (mem), r arithmetic operations add (mem), r/# adc (mem), r/# sub (mem), r/# sbc (mem), r/# inc #3, (mem) dec #3, (mem) logic operations and (mem), r/# or (mem), r/# xor (mem), r/# bit manipulation operations stcf #3/a, (mem) res #3, (mem) set #3, (mem) chg #3, (mem) tset #3, (mem) rotate and shift operations rlc (mem) rrc (mem) rl (mem) rr (mem) sla (mem) sra (mem) sll (mem) srl (mem) rld (mem) rrd (mem) (3) fc, fs, f fph , f sys and one state the clock frequency input on ins x1 and 2 is called f osch . the clock selected by dfmcr0 is called fc. the clock selected by syscr1 is called f fph . the clock frequency give by f fph divided by 2 is called f sys . one cycle of f sys is referred to as one state.
tmp92c820 2007-02-16 92c820-379 7.2 points to note (1) am0 and am1 pins this pin is connected to the v cc or the v ss pin. do not alter the level when the pin is active. (2) emu0 and emu1 open pins. (3) reserved address areas the tmp92c820 does not have any reserved areas. (4) warm-up counter the warm-up counter operates when stop mode is released, even if the system is using an external oscillator. as a result a time eq uivalent to the warm-up time elapses between input of the release request and output of the system clock. (5) programmable pull-up resistance the programmable pull-up resistor can be turned on/off by a program when the ports are set for use as input ports. when the ports are set for use as output ports, they cannot be turned on/off by a program. the data re gisters (e.g., p5) are used to turn the pull-up/pull-down resistors on/off. conseque ntly read-modify-write instructions are prohibited. (6) watchdog timer the watchdog timer starts operation immedi ately after a reset is released. when the watchdog timer is not to be used, disable it. (7) ad converter the string resistor between the vrefh and vrefl pins can be cut by a program so as to reduce power consumption. when stop mode is used, disable the resistor using the program before the halt instruction is executed. (8) cpu (micro dma) only the ?ldc cr, r? and ?ldc r, cr? inst ructions can be used to access the control registers in the cpu. (e.g., the transf er source address register (dmasn).) (9) undefined sfr the value of an undefined bit in an sfr is undefined when read. (10) pop sr instruction please execute the pop sr instruction during di condition. (11) releasing the halt mode by requesting an interruption usually, interrupts can release all ha lts status. however, the interrupts = (int0 to int3, intkey, intrtc and intalm0 to intalm4) which can release the halt mode may not be able to do so if they are input during the period cpu is shifting to the halt mode (for about 3 clocks of f fph ) with idle1 or stop mode (idle2 is not applicable). (in this case, an interrupt request is kept on hold internally.) if another interrupt is generated after it ha s shifted to halt mode completely, release halt status can be released without difficulty . the priority of this interrupt is compared with that of the interrupt kept on hold intern ally, and the interrupt with higher priority is handled first followed by the other interrupt.
tmp92c820 2007-02-16 92c820-380 8. package dimensions p-lqfp144-1616-0.40c unit: mm note: palladium plating


▲Up To Search▲   

 
Price & Availability of TMP92C820FG

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X